From e8245fb72212a9a68a67c85a424265a484699e6b Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Wed, 29 Mar 2023 05:24:23 +0530 Subject: [PATCH] Remove usages of ::set-output in Github Actions (#2966) This has be deprecated in favor of a new format. https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ --- #### Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No #### Type of change - [ ] :sunflower: Feature - [ ] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Supportability/Tests - [x] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup #### Issue(s) * fixes https://github.com/alcionai/corso/issues/1583 #### Test Plan - [ ] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- .github/actions/go-setup-cache/action.yml | 4 ++-- .github/workflows/_filechange_checker.yml | 4 ++-- .github/workflows/ci.yml | 24 ++++++++--------------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/actions/go-setup-cache/action.yml b/.github/actions/go-setup-cache/action.yml index 316aca3c6..e0ae92546 100644 --- a/.github/actions/go-setup-cache/action.yml +++ b/.github/actions/go-setup-cache/action.yml @@ -37,8 +37,8 @@ runs: - name: Determine Golang cache paths id: golang-path run: | - echo "::set-output name=build::$(go env GOCACHE)" - echo "::set-output name=module::$(go env GOMODCACHE)" + echo "build=$(go env GOCACHE)" | tee -a $GITHUB_OUTPUT + echo "module=$(go env GOMODCACHE)" | tee -a $GITHUB_OUTPUT shell: bash - name: Setup Golang cache diff --git a/.github/workflows/_filechange_checker.yml b/.github/workflows/_filechange_checker.yml index 9639080eb..8d02d1437 100644 --- a/.github/workflows/_filechange_checker.yml +++ b/.github/workflows/_filechange_checker.yml @@ -42,11 +42,11 @@ jobs: if: steps.dornycheck.outputs.src == 'true' || steps.dornycheck.outputs.actions == 'true' run: | echo "src or workflow file changes occurred" - echo ::set-output name=srcfileschanged::true + echo srcfileschanged=true >> $GITHUB_OUTPUT - name: Check dorny for changes in website related filepaths id: websitechecker if: steps.dornycheck.outputs.src == 'true' || steps.dornycheck.outputs.website == 'true' || steps.dornycheck.outputs.actions == 'true' run: | echo "website or workflow file changes occurred" - echo ::set-output name=websitefileschanged::true \ No newline at end of file + echo websitefileschanged=true >> $GITHUB_OUTPUT \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f38c43faf..a402b946d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,44 +100,36 @@ jobs: id: environment run: | if ${{ startsWith(github.ref, 'refs/tags/') }}; then - echo "set-output name=environment::Production" - echo "::set-output name=environment::Production" + echo "environment=Production" | tee -a $GITHUB_OUTPUT else - echo "set-output name=environment::Testing" - echo "::set-output name=environment::Testing" + echo "environment=Testing" | tee -a $GITHUB_OUTPUT fi - name: Get version string id: version run: | if ${{ startsWith(github.ref, 'refs/tags/') }}; then - echo "set-output name=version::$(git describe --exact-match --tags $(git rev-parse HEAD))" - echo "::set-output name=version::$(git describe --exact-match --tags $(git rev-parse HEAD))" + echo "version=$(git describe --exact-match --tags $(git rev-parse HEAD))" | tee -a $GITHUB_OUTPUT else - echo "set-output name=version::$(echo unreleased-$(git rev-parse --short HEAD))" - echo "::set-output name=version::$(echo unreleased-$(git rev-parse --short HEAD))" + echo "version=$(echo unreleased-$(git rev-parse --short HEAD))" | tee -a $GITHUB_OUTPUT fi - name: Get bucket name for website id: website-bucket run: | if ${{ startsWith(github.ref, 'refs/tags/') }}; then - echo "set-output name=website-bucket::corsobackup.io" - echo "::set-output name=website-bucket::corsobackup.io" + echo "website-bucket=corsobackup.io" | tee -a $GITHUB_OUTPUT else - echo "set-output name=website-bucket::test-corso-docs" - echo "::set-output name=website-bucket::test-corso-docs" + echo "website-bucket=test-corso-docs" | tee -a $GITHUB_OUTPUT fi - name: Get cfid for website id: website-cfid run: | if ${{ startsWith(github.ref, 'refs/tags/') }}; then - echo "set-output name=website-cfid::E1W9NGI9YTVZ1A" - echo "::set-output name=website-cfid::E1W9NGI9YTVZ1A" + echo "website-cfid=E1W9NGI9YTVZ1A" | tee -a $GITHUB_OUTPUT else - echo "set-output name=website-cfid::ESFTEIYTIP7Y3" - echo "::set-output name=website-cfid::ESFTEIYTIP7Y3" + echo "website-cfid=ESFTEIYTIP7Y3" | tee -a $GITHUB_OUTPUT fi