Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the deprecated command set-output of GitHub Actions #48

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

eason9487
Copy link
Member

@eason9487 eason9487 commented Apr 13, 2023

Changes proposed in this Pull Request:

According to GitHub Actions: Deprecating save-state and set-output commands:

To avoid untrusted logged data to use save-stateand set-output workflow commands without the intention of the workflow author we have introduced a new set of environment files to manage state and output.

We are monitoring telemetry for the usage of these commands and plan to fully disable them on 31st May 2023. Starting 1st June 2023 workflows using save-state or set-output commands via stdout will fail with an error.

This PR replaces the three uses of the stdout command set-output with the GITHUB_OUTPUT environment file.

  1. run: echo "::set-output name=dir::$(composer config cache-files-dir)"
  2. echo "::set-output name=tag_name::${TAG_NAME}"
  3. echo "::set-output name=sha::$(git rev-parse HEAD)"

📌 Checklist after merging this PR: (@eason9487)

Detailed test instructions:

.github/workflows/github-actions-release.yml

  1. View the latest release job of version actions-v1.4.0: https://github.com/woocommerce/grow/actions/runs/4604724324
    • There are two warnings in the Annotations block.
    • The warnings come from these two positions: #1 and #2
      image
  2. View the testing release job of this PR: https://github.com/woocommerce/grow/actions/runs/4687795132
    • There should be no longer warnings in the Annotations block.
    • Check if its release build 3bbb75a was created successfully.
    • Check if the tag_name is passed with the right value.
      2023-04-13 18 21 12
    • Check if the sha is passed with the right value.
      image

packages/js/github-actions/actions/prepare-php/action.yml

  1. View a job that used the prepare-php action in GLA: https://github.com/woocommerce/google-listings-and-ads/actions/runs/4686389698
    • There is a warning in the Annotations block.
    • The warning comes from this position
      image
  2. View the testing job that is temporarily targeted to the test build actions-v1.4.1-pre of this PR: https://github.com/woocommerce/google-listings-and-ads/actions/runs/4688047311
    • There should be no longer warnings in the Annotations block.
    • Check if the dir is passed correctly.
      2023-04-13 18 33 27

@eason9487 eason9487 added priority: high The issue/PR is high priority—if affect lots of customers substantially, but not critically. [actions] changelog: tweak labels Apr 13, 2023
@eason9487 eason9487 requested a review from a team April 13, 2023 10:40
@eason9487 eason9487 self-assigned this Apr 13, 2023
Copy link
Contributor

@puntope puntope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM

thanks for the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[actions] changelog: tweak priority: high The issue/PR is high priority—if affect lots of customers substantially, but not critically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants