diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 5e119b9fb..60e6a4cb6 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -19,6 +19,7 @@ on: env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/backend + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} BUILD_ARM: ${{ github.event.inputs.build_arm || github.inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: @@ -55,7 +56,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- - type=raw,value=${{ github.head_ref || github.ref_name }}-arm,enable=${{ env.BUILD_ARM }} + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: diff --git a/.github/workflows/config-preprocessor-build.yml b/.github/workflows/config-preprocessor-build.yml index fd72ff03e..a34a1e293 100644 --- a/.github/workflows/config-preprocessor-build.yml +++ b/.github/workflows/config-preprocessor-build.yml @@ -19,6 +19,7 @@ on: env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/config-processor + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} BUILD_ARM: ${{ github.event.inputs.build_arm || github.inputs.build_arm || github.ref == 'refs/heads/main' }} defaults: @@ -57,7 +58,7 @@ jobs: type=ref,event=branch type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=sha,prefix=commit- - type=raw,value=${{ github.ref == 'refs/heads/main' && 'main' || github.ref }}-arm,enable=${{ env.BUILD_ARM }} + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Build and push image uses: docker/build-push-action@v5 with: diff --git a/.github/workflows/dummyPreprocessing.yml b/.github/workflows/dummyPreprocessing.yml index f26c333ce..22d8ac907 100644 --- a/.github/workflows/dummyPreprocessing.yml +++ b/.github/workflows/dummyPreprocessing.yml @@ -19,6 +19,7 @@ on: env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/preprocessing-dummy + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} BUILD_ARM: ${{ github.event.inputs.build_arm || github.inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: @@ -52,7 +53,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- - type=raw,value=${{ github.ref == 'refs/heads/main' && 'main' || github.ref }}-arm,enable=${{ env.BUILD_ARM }} + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/ingest.yml b/.github/workflows/ingest.yml index a3a498987..0e6ed8079 100644 --- a/.github/workflows/ingest.yml +++ b/.github/workflows/ingest.yml @@ -18,6 +18,7 @@ on: env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/ingest + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} BUILD_ARM: ${{ github.event.inputs.build_arm || github.inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: @@ -52,7 +53,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- - type=raw,value=${{ github.ref == 'refs/heads/main' && 'main' || github.ref }}-arm,enable=${{ env.BUILD_ARM }} + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/keycloakify-build.yml b/.github/workflows/keycloakify-build.yml index 5c8cfe969..c4d37a92c 100644 --- a/.github/workflows/keycloakify-build.yml +++ b/.github/workflows/keycloakify-build.yml @@ -18,6 +18,7 @@ on: required: false env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/keycloakify + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} BUILD_ARM: ${{ github.event.inputs.build_arm || github.inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: @@ -56,7 +57,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- - type=raw,value=${{ github.ref == 'refs/heads/main' && 'main' || github.ref }}-arm,enable=${{ env.BUILD_ARM }} + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Check if image exists id: check-image run: | diff --git a/.github/workflows/preprocessing-nextclade.yml b/.github/workflows/preprocessing-nextclade.yml index 209541d95..ace03aba9 100644 --- a/.github/workflows/preprocessing-nextclade.yml +++ b/.github/workflows/preprocessing-nextclade.yml @@ -19,6 +19,7 @@ on: env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/preprocessing-nextclade + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} BUILD_ARM: ${{ github.event.inputs.build_arm || github.inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: @@ -53,7 +54,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- - type=raw,value=${{ github.ref == 'refs/heads/main' && 'main' || github.ref }}-arm,enable=${{ env.BUILD_ARM }} + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 4d695dfde..d868a3f98 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -18,6 +18,7 @@ on: required: false env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/website + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} BUILD_ARM: ${{ github.event.inputs.build_arm || github.inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: @@ -52,7 +53,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- - type=raw,value=${{ github.ref == 'refs/heads/main' && 'main' || github.ref }}-arm,enable=${{ env.BUILD_ARM }} + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3