ci: Fix nightly image not being pushed to ghcr (#10620)

This commit is contained in:
Tomi Turtiainen 2024-08-30 10:48:26 +03:00 committed by GitHub
parent 7e9d186496
commit c5c903ba8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,6 +32,9 @@ on:
required: false required: false
default: '' default: ''
env:
N8N_TAG: ${{ inputs.tag || 'nightly' }}
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -76,10 +79,10 @@ jobs:
push: true push: true
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max 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 - name: Login to GitHub Container Registry
if: github.event.inputs.tag == 'nightly' if: env.N8N_TAG == 'nightly'
uses: docker/login-action@v3.0.0 uses: docker/login-action@v3.0.0
with: with:
registry: ghcr.io registry: ghcr.io
@ -87,7 +90,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Push image to GHCR - name: Push image to GHCR
if: github.event.inputs.tag == 'nightly' if: env.N8N_TAG == 'nightly'
run: | run: |
docker buildx imagetools create \ docker buildx imagetools create \
--tag ghcr.io/${{ github.repository_owner }}/n8n:nightly \ --tag ghcr.io/${{ github.repository_owner }}/n8n:nightly \