From b0152636d82eaa831c6ca7168b7483520250dcc0 Mon Sep 17 00:00:00 2001 From: Morlay Date: Fri, 6 Jan 2023 11:19:02 +0800 Subject: [PATCH] chore: migrate to github action environment files --- .github/workflows/docker-publish-images.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-publish-images.yml b/.github/workflows/docker-publish-images.yml index 28a57ec..4fead65 100644 --- a/.github/workflows/docker-publish-images.yml +++ b/.github/workflows/docker-publish-images.yml @@ -50,7 +50,7 @@ jobs: - run: cd .. && make patch - id: prepare - run: echo "::set-output name=tag::$(cat ../version)" + run: echo "tag=$(cat ../version)" >> $GITHUB_ENV - name: Build base image uses: docker/build-push-action@v3 @@ -60,9 +60,9 @@ jobs: platforms: linux/amd64,linux/arm64 labels: | org.opencontainers.image.source=https://github.com/${{ github.repository }} - org.opencontainers.image.revision=${{ steps.prepare.outputs.tag }} + org.opencontainers.image.revision=${{ env.tag }} push: ${{ github.event_name != 'pull_request' }} - tags: ghcr.io/${{ github.repository }}/harbor-${{ matrix.component }}-base:${{ steps.prepare.outputs.tag }} + tags: ghcr.io/${{ github.repository }}/harbor-${{ matrix.component }}-base:${{ env.tag }} docker-image: needs: @@ -117,7 +117,7 @@ jobs: - run: cd .. && make patch - id: prepare - run: echo "::set-output name=tag::$(cat ../version)" + run: echo "tag=$(cat ../version)" >> $GITHUB_ENV - name: Build & Publish images env: @@ -131,7 +131,7 @@ jobs: run: | set -eux; - CTX="BUILDBIN=true VERSIONTAG=${{ steps.prepare.outputs.tag }} BASEIMAGETAG=${{ steps.prepare.outputs.tag }} MULTIARCH=${MULTIARCH} IMAGENAMESPACE=${IMAGENAMESPACE} BASEIMAGENAMESPACE=${BASEIMAGENAMESPACE} TRIVYFLAG=${TRIVYFLAG} CHARTFLAG=${CHARTFLAG} NOTARYFLAG=${CHARTFLAG} IMAGELABELS=${IMAGELABELS}" + CTX="BUILDBIN=true VERSIONTAG=${{ env.tag }} BASEIMAGETAG=${{ env.tag }} MULTIARCH=${MULTIARCH} IMAGENAMESPACE=${IMAGENAMESPACE} BASEIMAGENAMESPACE=${BASEIMAGENAMESPACE} TRIVYFLAG=${TRIVYFLAG} CHARTFLAG=${CHARTFLAG} NOTARYFLAG=${CHARTFLAG} IMAGELABELS=${IMAGELABELS}" sudo make versions_prepare ${CTX};