From 07600b42fdb19ca4d49ffbc37e6e8e52ffd1449b Mon Sep 17 00:00:00 2001 From: Tomi Turtiainen <10324676+tomi@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:58:28 +0300 Subject: [PATCH] ci: Push nightly images to ghcr (no-changelog) (#10580) --- .github/workflows/docker-images-nightly.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-images-nightly.yml b/.github/workflows/docker-images-nightly.yml index 34950d7ac2413..189b690cbd91a 100644 --- a/.github/workflows/docker-images-nightly.yml +++ b/.github/workflows/docker-images-nightly.yml @@ -64,7 +64,7 @@ jobs: [[ "${{github.event.inputs.merge-master}}" == "true" ]] && git remote add upstream https://github.com/n8n-io/n8n.git -f; git merge upstream/master --allow-unrelated-histories || echo "" shell: bash - - name: Build and push + - name: Build and push to DockerHub uses: docker/build-push-action@v5.1.0 with: context: . @@ -78,6 +78,21 @@ jobs: cache-to: type=gha,mode=max tags: ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.tag || 'nightly' }} + - name: Login to GitHub Container Registry + if: github.event.inputs.tag == 'nightly' + uses: docker/login-action@v3.0.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push image to GHCR + if: github.event.inputs.tag == 'nightly' + run: | + docker buildx imagetools create \ + --tag ghcr.io/${{ github.repository_owner }}/n8n:nightly \ + ${{ secrets.DOCKER_USERNAME }}/n8n:nightly + - name: Call Success URL - optionally run: | [[ "${{github.event.inputs.success-url}}" != "" ]] && curl -v ${{github.event.inputs.success-url}} || echo ""