From c5c903ba8b25594802529d2b6565617bece125cb Mon Sep 17 00:00:00 2001 From: Tomi Turtiainen <10324676+tomi@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:48:26 +0300 Subject: [PATCH] ci: Fix nightly image not being pushed to ghcr (#10620) --- .github/workflows/docker-images-nightly.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-images-nightly.yml b/.github/workflows/docker-images-nightly.yml index 189b690cbd..b6831b6399 100644 --- a/.github/workflows/docker-images-nightly.yml +++ b/.github/workflows/docker-images-nightly.yml @@ -32,6 +32,9 @@ on: required: false default: '' +env: + N8N_TAG: ${{ inputs.tag || 'nightly' }} + jobs: build: runs-on: ubuntu-latest @@ -76,10 +79,10 @@ jobs: push: true cache-from: type=gha cache-to: type=gha,mode=max - tags: ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.tag || 'nightly' }} + tags: ${{ secrets.DOCKER_USERNAME }}/n8n:${{ env.N8N_TAG }} - name: Login to GitHub Container Registry - if: github.event.inputs.tag == 'nightly' + if: env.N8N_TAG == 'nightly' uses: docker/login-action@v3.0.0 with: registry: ghcr.io @@ -87,7 +90,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Push image to GHCR - if: github.event.inputs.tag == 'nightly' + if: env.N8N_TAG == 'nightly' run: | docker buildx imagetools create \ --tag ghcr.io/${{ github.repository_owner }}/n8n:nightly \