From 5287f3f26ba7a3f8b36b80d712f8a15108000ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Fei?= Date: Fri, 11 Nov 2022 09:20:13 +0100 Subject: [PATCH] chore: replace deprecated set-output command (#43) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Niccolò Fei --- .github/generate-strategy.sh | 7 ++++++- .github/workflows/build.yml | 8 +++----- .github/workflows/update.yml | 1 - 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/generate-strategy.sh b/.github/generate-strategy.sh index 83999570..0adc6c25 100755 --- a/.github/generate-strategy.sh +++ b/.github/generate-strategy.sh @@ -13,6 +13,8 @@ declare -A aliases=( [15]='latest' ) +GITHUB_ACTIONS=${GITHUB_ACTIONS:-false} + cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}/..")")" BASE_DIRECTORY="$(pwd)" @@ -71,4 +73,7 @@ done # Build the strategy as a JSON object strategy="{\"fail-fast\": false, \"matrix\": {\"include\": [$(join ', ' "${entries[@]}")]}}" jq -C . <<<"$strategy" # sanity check / debugging aid -echo "::set-output name=strategy::$(jq -c . <<<"$strategy")" + +if [[ "$GITHUB_ACTIONS" == "true" ]]; then + echo "strategy=$(jq -c . <<<"$strategy")" >> $GITHUB_OUTPUT +fi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aca97e89..2a961d0e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,6 @@ jobs: platforms: ${{ matrix.platforms }} - name: Docker meta - id: docker-meta env: TAGS: ${{ toJson(matrix.tags) }} run: | @@ -58,10 +57,9 @@ jobs: RESULT="${RESULT},ghcr.io/${IMAGE_RELEASE}:${tag}" fi done - echo "::set-output name=tags::${RESULT%,}" + echo "TAGS=${RESULT%,}" >> $GITHUB_ENV - name: Set up Docker Buildx - id: buildx uses: docker/setup-buildx-action@v2 - name: Log in to the GitHub Container registry @@ -78,7 +76,7 @@ jobs: file: ${{ matrix.file }} push: false load: true - tags: ${{ steps.docker-meta.outputs.tags }} + tags: ${{ env.TAGS }} - name: Dockle scan uses: erzz/dockle-action@v1 @@ -96,4 +94,4 @@ jobs: file: ${{ matrix.file }} platforms: ${{ matrix.platforms }} push: true - tags: ${{ steps.docker-meta.outputs.tags }} + tags: ${{ env.TAGS }} diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 480fa26b..10c953ba 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -40,7 +40,6 @@ jobs: branch: main enforce_admins: false - uses: EndBug/add-and-commit@v9 - id: commit with: author_name: EnterpriseDB Automated Updates author_email: noreply@enterprisedb.com