From c479c29b05495ef21f0309ed3b86f69ae8804a98 Mon Sep 17 00:00:00 2001 From: William Oldham Date: Sun, 5 Oct 2025 20:20:55 +0100 Subject: [PATCH 1/3] Only do ip2location for main brain build --- .github/workflows/docker.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 34ca976..f0dc6f7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,6 +10,7 @@ env: IMAGE_NAME: ${{ github.repository }} DEFAULT_BRANCH: ${{ format('refs/heads/{0}', github.event.repository.default_branch) }} SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'push' && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.ref == 'refs/heads/dev')) || github.event_name == 'workflow_dispatch' }} + SHOULD_DOWNLOAD_IP2LOCATION_DB: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} jobs: build-publish-amd64: @@ -53,8 +54,7 @@ jobs: push: ${{ env.SHOULD_PUSH_IMAGE }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - secrets: | - "ip2location-token=${{ secrets.IP2LOCATION_TOKEN }}" + secrets: ip2location-token=${{ env.SHOULD_DOWNLOAD_IP2LOCATION_DB == 'true' && secrets.IP2LOCATION_TOKEN || '' }} cache-from: type=gha cache-to: type=gha,mode=max @@ -99,7 +99,6 @@ jobs: push: ${{ env.SHOULD_PUSH_IMAGE }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - secrets: | - "ip2location-token=${{ secrets.IP2LOCATION_TOKEN }}" + secrets: ip2location-token=${{ env.SHOULD_DOWNLOAD_IP2LOCATION_DB == 'true' && secrets.IP2LOCATION_TOKEN || '' }} cache-from: type=gha cache-to: type=gha,mode=max From 544383fe3d112e6cbc1ed8f724825b33d1af4ae6 Mon Sep 17 00:00:00 2001 From: William Oldham Date: Sun, 5 Oct 2025 20:24:53 +0100 Subject: [PATCH 2/3] chore: use the master branch, not the default branch --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f0dc6f7..89f8cb4 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,7 +10,7 @@ env: IMAGE_NAME: ${{ github.repository }} DEFAULT_BRANCH: ${{ format('refs/heads/{0}', github.event.repository.default_branch) }} SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'push' && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.ref == 'refs/heads/dev')) || github.event_name == 'workflow_dispatch' }} - SHOULD_DOWNLOAD_IP2LOCATION_DB: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} + SHOULD_DOWNLOAD_IP2LOCATION_DB: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} jobs: build-publish-amd64: From e3fcd8f47f53ec862b9347dc256e4d6c83eb9df2 Mon Sep 17 00:00:00 2001 From: William Oldham Date: Sun, 5 Oct 2025 20:28:34 +0100 Subject: [PATCH 3/3] chore: use master branch for all references --- .github/workflows/docker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 89f8cb4..1a48aeb 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -8,8 +8,8 @@ on: env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} - DEFAULT_BRANCH: ${{ format('refs/heads/{0}', github.event.repository.default_branch) }} - SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'push' && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.ref == 'refs/heads/dev')) || github.event_name == 'workflow_dispatch' }} + RELEASE_BRANCH: refs/heads/master + SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev')) || github.event_name == 'workflow_dispatch' }} SHOULD_DOWNLOAD_IP2LOCATION_DB: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} jobs: @@ -42,7 +42,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=latest,enable=${{ github.ref == env.DEFAULT_BRANCH }} + type=raw,value=latest,enable=${{ github.ref == env.RELEASE_BRANCH }} type=raw,value=edge,enable=${{ github.ref == 'refs/heads/dev' }} type=sha @@ -87,7 +87,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=latest-arm,enable=${{ github.ref == env.DEFAULT_BRANCH }} + type=raw,value=latest-arm,enable=${{ github.ref == env.RELEASE_BRANCH }} type=raw,value=edge-arm,enable=${{ github.ref == 'refs/heads/dev' }} type=sha,suffix=-arm