From 30f0511e1e5f92d3f61ac54cb1fa822e5139e155 Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Mon, 15 Jun 2026 23:31:55 +0100 Subject: [PATCH 1/4] Rename existing workflow --- .github/workflows/ci-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index e53e6da..15aefe0 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -3,7 +3,7 @@ on: tags: - 'v*' -name: Upload Release Asset +name: Publish releases jobs: build: From e8ac85e9e802a18e7c9739f830c3fac846799a93 Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Mon, 15 Jun 2026 23:32:04 +0100 Subject: [PATCH 2/4] Set permissions on existing release job --- .github/workflows/ci-release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 15aefe0..96e7c7b 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -9,6 +9,8 @@ jobs: build: name: Upload Release Asset runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout code uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 From 29e66877b1d62cfd7778118d54e53b80e547e068 Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Mon, 15 Jun 2026 23:32:29 +0100 Subject: [PATCH 3/4] Fix trailing whitespace --- .github/workflows/ci-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 96e7c7b..d56bfc1 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -28,7 +28,7 @@ jobs: draft: true prerelease: false - name: Upload Release Asset - id: upload-release-asset + id: upload-release-asset uses: actions/upload-release-asset@ef2adfe8cb8ebfa540930c452c576b3819990faa env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 606a5681f6c5a6b0783ecc0a09828d99c2fca385 Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Mon, 15 Jun 2026 23:32:41 +0100 Subject: [PATCH 4/4] Add build Docker image job --- .github/workflows/ci-release.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index d56bfc1..06d8177 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -37,3 +37,29 @@ jobs: asset_path: ./hookbot_linux_amd64 asset_name: hookbot_linux_amd64 asset_content_type: application/octet-stream + + build_docker_image: + name: Build and push Docker image + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout code + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + + - name: Log in to GitHub Container Registry + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_ACTOR: ${{ github.actor }} + run: echo "$GH_TOKEN" | docker login ghcr.io -u "$GH_ACTOR" --password-stdin + + - name: Build and push Docker image + env: + REPO_NAME: ${{ github.repository }} + TAG_NAME: ${{ github.ref_name }} + run: | + IMAGE_ID="ghcr.io/${REPO_NAME}" + + docker build -t "$IMAGE_ID:$TAG_NAME" . + docker push "$IMAGE_ID:$TAG_NAME"