From 885279c1c3eb5eb6ced5211f84af4915f60c861d Mon Sep 17 00:00:00 2001 From: Emil Kais Date: Mon, 30 Dec 2024 23:38:26 -0300 Subject: [PATCH] Add build-args and tags to build-and-push job --- .github/workflows/release-publish.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 8a2801c36cc29..920fc2a32b711 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -7,11 +7,14 @@ on: jobs: build-and-push: + # needs: [publish-to-npm] runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3.0.0 @@ -23,8 +26,15 @@ jobs: password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Build and Push Docker Image - uses: docker/build-push-action@v3.0.0 + uses: docker/build-push-action@v5.1.0 with: context: ./docker/images/n8n + build-args: | + N8N_VERSION=${{ needs.publish-to-npm.outputs.release }} + platforms: linux/amd64,linux/arm64 + provenance: false push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/your-image-name:latest + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/n8n:${{ needs.publish-to-npm.outputs.release }} + ghcr.io/${{ github.repository_owner }}/n8n:${{ needs.publish-to-npm.outputs.release }} +