From bdf3d43de38dda99849f29b8be65230c95e32dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Fri, 19 Jul 2024 09:34:13 +0200 Subject: [PATCH 1/5] FIX image build gitactions --- .github/workflows/publishimage-master.yml | 4 +++- .github/workflows/publishimage-tag.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publishimage-master.yml b/.github/workflows/publishimage-master.yml index c1d42e8662..0be42eef6e 100644 --- a/.github/workflows/publishimage-master.yml +++ b/.github/workflows/publishimage-master.yml @@ -26,7 +26,9 @@ jobs: password: ${{ secrets.DOCKERHUB_TEF_TOKEN }} - name: Build Docker image - run: docker build -t telefonicaiot/fiware-orion:latest --build-arg GIT_REV_ORION=master --secret id=repo_token,env=${{ secrets.REPO_ACCESS_TOKEN }} --no-cache -f docker/Dockerfile . + run: + export TOKEN=${{ secrets.REPO_ACCESS_TOKEN }} + docker build -t telefonicaiot/fiware-orion:latest --build-arg GIT_REV_ORION=master --secret id=repo_token,env=TOKEN --no-cache -f docker/Dockerfile . - name: Push Docker image run: docker push telefonicaiot/fiware-orion:latest diff --git a/.github/workflows/publishimage-tag.yml b/.github/workflows/publishimage-tag.yml index 0218590d03..4ff10ad638 100644 --- a/.github/workflows/publishimage-tag.yml +++ b/.github/workflows/publishimage-tag.yml @@ -30,7 +30,9 @@ jobs: run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: Build Docker image - run: docker build -t telefonicaiot/fiware-orion:${{ env.VERSION }} --build-arg GIT_REV_ORION=${{ env.VERSION }} --secret id=repo_token,env=${{ secrets.REPO_ACCESS_TOKEN }} --no-cache -f docker/Dockerfile . + run: + export TOKEN=${{ secrets.REPO_ACCESS_TOKEN }} + docker build -t telefonicaiot/fiware-orion:${{ env.VERSION }} --build-arg GIT_REV_ORION=${{ env.VERSION }} --secret id=repo_token,env=TOKEN --no-cache -f docker/Dockerfile . - name: Push Docker image run: docker push telefonicaiot/fiware-orion:${{ env.VERSION }} From bcad605ce7f1ddeb9eb1f1e04b28d8e9b3607443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Fri, 19 Jul 2024 10:46:00 +0200 Subject: [PATCH 2/5] FIX temporal test --- .github/workflows/publishimage-master.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publishimage-master.yml b/.github/workflows/publishimage-master.yml index 0be42eef6e..c28487ce23 100644 --- a/.github/workflows/publishimage-master.yml +++ b/.github/workflows/publishimage-master.yml @@ -6,7 +6,8 @@ name: Publish Docker image (master) on: push: branches: - - master + # FIXME: temporal test + - hardening/build-gitactions jobs: build-and-push: From 522a429b8e7a4b016ec8733392e00774fee2839f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Fri, 19 Jul 2024 10:51:27 +0200 Subject: [PATCH 3/5] FIX gitactions syntax --- .github/workflows/publishimage-master.yml | 2 +- .github/workflows/publishimage-tag.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publishimage-master.yml b/.github/workflows/publishimage-master.yml index c28487ce23..5e7ada2398 100644 --- a/.github/workflows/publishimage-master.yml +++ b/.github/workflows/publishimage-master.yml @@ -27,7 +27,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TEF_TOKEN }} - name: Build Docker image - run: + run: | export TOKEN=${{ secrets.REPO_ACCESS_TOKEN }} docker build -t telefonicaiot/fiware-orion:latest --build-arg GIT_REV_ORION=master --secret id=repo_token,env=TOKEN --no-cache -f docker/Dockerfile . diff --git a/.github/workflows/publishimage-tag.yml b/.github/workflows/publishimage-tag.yml index 4ff10ad638..1dd80f8f95 100644 --- a/.github/workflows/publishimage-tag.yml +++ b/.github/workflows/publishimage-tag.yml @@ -30,7 +30,7 @@ jobs: run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: Build Docker image - run: + run: | export TOKEN=${{ secrets.REPO_ACCESS_TOKEN }} docker build -t telefonicaiot/fiware-orion:${{ env.VERSION }} --build-arg GIT_REV_ORION=${{ env.VERSION }} --secret id=repo_token,env=TOKEN --no-cache -f docker/Dockerfile . From 049b0c9f3be9c76c7cd265bb6dfe34f5528a61f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Fri, 19 Jul 2024 14:44:22 +0200 Subject: [PATCH 4/5] Update publishimage-master.yml --- .github/workflows/publishimage-master.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publishimage-master.yml b/.github/workflows/publishimage-master.yml index 5e7ada2398..1e056970fb 100644 --- a/.github/workflows/publishimage-master.yml +++ b/.github/workflows/publishimage-master.yml @@ -5,9 +5,8 @@ name: Publish Docker image (master) on: push: - branches: - # FIXME: temporal test - - hardening/build-gitactions + branches: + - master jobs: build-and-push: From 7e0af0633161ba3333003ee0201a29a6a9266e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Fri, 19 Jul 2024 14:44:37 +0200 Subject: [PATCH 5/5] Update publishimage-master.yml --- .github/workflows/publishimage-master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publishimage-master.yml b/.github/workflows/publishimage-master.yml index 1e056970fb..df3d93908d 100644 --- a/.github/workflows/publishimage-master.yml +++ b/.github/workflows/publishimage-master.yml @@ -5,7 +5,7 @@ name: Publish Docker image (master) on: push: - branches: + branches: - master jobs: