From 62e7335c546f66878b3f25846382e407c4b6e591 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Thu, 9 Feb 2023 17:08:40 -0500 Subject: [PATCH] chore: Update deprecated set-output command (#2879) GitHub is deprecating `set-output`. Updating these commands to their new recommended approach. --- .github/workflows/build.yml | 28 ++++++++++++++-------------- .github/workflows/enos-run.yml | 2 +- .github/workflows/jira.yml | 6 +++--- .github/workflows/linting.yml | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2fc056e76..149fbf6bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: # version, because "goenv" can react to it automatically. run: | echo "Building with Go $(cat .go-version)" - echo "::set-output name=go-version::$(cat .go-version)" + echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT - name: Set up Go uses: actions/setup-go@v3 with: @@ -44,8 +44,8 @@ jobs: - name: Determine Go cache paths id: go-cache-paths run: | - echo "::set-output name=go-build::$(go env GOCACHE)" - echo "::set-output name=go-mod::$(go env GOMODCACHE)" + echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT + echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT - name: Set up Go modules cache uses: actions/cache@v3 with: @@ -60,13 +60,13 @@ jobs: # Run make edition twice to ensure that extra go output isn't included run: | make edition - echo "::set-output name=product-edition::$(make edition)" + echo "product-edition=$(make edition)" >> $GITHUB_OUTPUT - name: Determine minor product version id: get-product-minor-version run: | VERSION=${{ needs.set-product-version.outputs.product-version }} MINOR_VERSION=$(echo $VERSION | cut -d. -f-2) - echo "::set-output name=product-minor-version::$MINOR_VERSION" + echo "product-minor-version=$MINOR_VERSION" >> $GITHUB_OUTPUT verify-product-metadata: needs: @@ -134,8 +134,8 @@ jobs: - name: Determine Go cache paths id: go-cache-paths run: | - echo "::set-output name=go-build::$(go env GOCACHE)" - echo "::set-output name=go-mod::$(go env GOMODCACHE)" + echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT + echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT - name: Set up Go modules cache uses: actions/cache@v3 with: @@ -149,7 +149,7 @@ jobs: run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" - name: Determine SHA id: set-sha - run: echo "::set-output name=sha::$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)" + run: echo "sha=$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)" >> $GITHUB_OUTPUT - name: Download UI artifact uses: dawidd6/action-download-artifact@v2 with: @@ -207,8 +207,8 @@ jobs: - name: Determine Go cache paths id: go-cache-paths run: | - echo "::set-output name=go-build::$(go env GOCACHE)" - echo "::set-output name=go-mod::$(go env GOMODCACHE)" + echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT + echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT - name: Set up Go modules cache uses: actions/cache@v3 with: @@ -220,7 +220,7 @@ jobs: ${{ runner.os }}-go- - name: Determine SHA id: set-sha - run: echo "::set-output name=sha::$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)" + run: echo "sha=$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)" >> $GITHUB_OUTPUT - name: Download UI artifact uses: dawidd6/action-download-artifact@v2 with: @@ -305,8 +305,8 @@ jobs: - name: Determine Go cache paths id: go-cache-paths run: | - echo "::set-output name=go-build::$(go env GOCACHE)" - echo "::set-output name=go-mod::$(go env GOMODCACHE)" + echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT + echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT - name: Set up Go modules cache uses: actions/cache@v3 with: @@ -318,7 +318,7 @@ jobs: ${{ runner.os }}-go- - name: Determine SHA id: set-sha - run: echo "::set-output name=sha::$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)" + run: echo "sha=$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)" >> $GITHUB_OUTPUT - name: Download UI artifact uses: dawidd6/action-download-artifact@v2 with: diff --git a/.github/workflows/enos-run.yml b/.github/workflows/enos-run.yml index a37eb77f9..2db3f5578 100644 --- a/.github/workflows/enos-run.yml +++ b/.github/workflows/enos-run.yml @@ -60,7 +60,7 @@ jobs: echo "trusted-key ${{ secrets.ENOS_GPG_UID }}" >> ~/.gnupg/gpg.conf cat ~/.gnupg/gpg.conf - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v1-node16 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index df726e9d3..5e064d32d 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -25,7 +25,7 @@ jobs: else echo "Actor ${{ github.actor }} is not a ${TEAM} team member" fi - echo "::set-output name=role::${ROLE}" + echo "role=${ROLE}" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.JIRA_SYNC_GITHUB_TOKEN }} @@ -41,9 +41,9 @@ jobs: id: set-ticket-type run: | if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then - echo "::set-output name=type::PR" + echo "type=PR" >> $GITHUB_OUTPUT else - echo "::set-output name=type::ISS" + echo "type=ISS" >> $GITHUB_OUTPUT fi - name: Create ticket diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index e3742a965..a2ef6e7cc 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -15,7 +15,7 @@ jobs: # version, because "goenv" can react to it automatically. run: | echo "Building with Go $(cat .go-version)" - echo "::set-output name=go-version::$(cat .go-version)" + echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT - name: Set up Go uses: actions/setup-go@v3 with: