Skip to content

Bumped Go modules

Bumped Go modules #9

Workflow file for this run

name: build
on:
push:
branches:
- main
jobs:
koyeb-exporter:
name: koyeb-exporter
runs-on: ubuntu-latest
env:
REPO: dazwilkin/koyeb-exporter
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: docker/setup-buildx-action@v2
- name: Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR }}
- name: Get kernel version
run: echo "VERSION=$(uname --kernel-release)" >> ${GITHUB_ENV}
- name: build-push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
build-args: |
VERSION=${{ env.VERSION }}
COMMIT=${{ github.sha }}
tags: ghcr.io/${{ env.REPO }}:${{ github.sha }}
push: true
# - name: Sigstore installer
# uses: sigstore/cosign-installer@main
# - name: Write signing key to disk (only needed for `cosign sign --key`)
# run: echo "${{ secrets.SIGNING }}" > ./cosign.key
# - name: Sign container image
# run: |
# cosign sign \
# --key=./cosign.key \
# --annotations="repo=${{ github.repository }}" \
# --annotations="workflow=${{ github.workflow }}" \
# --annotations="commit=${{ github.sha }}" \
# --annotations="version=${{ env.VERSION }}" \
# ghcr.io/${{ env.REPO }}:${{ github.sha }}
# env:
# COSIGN_PASSWORD: ""
# - name: Revise occurrences of the image
# run: |
# git config --local user.email "action@github.com"
# git config --local user.name "GitHub Actions"
# for FILENAME in "./README.md"
# do
# sed \
# --in-place \
# --expression="s|ghcr.io/${{ env.REPO }}:[0-9a-f]\{40\}|ghcr.io/${{ env.REPO }}:${{ github.sha }}|g" \
# ${FILENAME}
# git add ${FILENAME}
# done
# git commit --message "GitHub Actions update image references"
# git push origin master