Skip to content

Replace deprecated set-output with GITHUB_OUTPUT#10

Merged
tlylt merged 7 commits intoMarkBind:masterfrom
yucheng11122017:replaceSetOutput
Apr 13, 2023
Merged

Replace deprecated set-output with GITHUB_OUTPUT#10
tlylt merged 7 commits intoMarkBind:masterfrom
yucheng11122017:replaceSetOutput

Conversation

@yucheng11122017
Copy link
Contributor

@yucheng11122017 yucheng11122017 commented Mar 28, 2023

Resolves #9 and Resolves #12

As set-output and save-state is set to be deprecated, let's get rid of it before it is deprecated.
Markbind actions only uses set-output

Overview of changes
Change set-output to use GITHUB_OUTPUT instead.

Testing instructions

  1. Make repo using markbind init or use existing repo.
  2. Add fork-build.yml, fork-preview.yml and unpublish-preview.yml according to README in reusable workflows.
  3. Change the uses to yucheng11122017/markbind-action/.github/workflows/{FILE_NAME}@replaceSetOutput for each of the above files
  4. Create a new pull request to main branch (or change the name of branch in workflow to the branch you make a PR to)
  5. Check logs that the PR number and PR URL of the deployed site is as expected.
  6. Close PR to trigger unpublish-preview.yml
  7. Check action logs to check that the correct URL is being torn down
  8. Check that site is actually torn down by going to the site and seeing project not found error

Proposed commit message
Replace deprecated set-output with GITHUB_OUTPUT

@jovyntls
Copy link

jovyntls commented Apr 4, 2023

Nice catch on the deprecations @yucheng11122017 :) I haven't tested it, but can we update the commit message to include a note on why we are doing this replacement?

@yucheng11122017
Copy link
Contributor Author

Nice catch on the deprecations @yucheng11122017 :) I haven't tested it, but can we update the commit message to include a note on why we are doing this replacement?

I added deprecated hope thats ok!

@tlylt
Copy link
Collaborator

tlylt commented Apr 10, 2023

@yucheng11122017 do you have links to your tested repos/workflow runs? I think the syntax looks correct, I can take a second look at your testing to confirm.

@yucheng11122017
Copy link
Contributor Author

Hi @tlylt,
this is the workflow for fork-preview.yml. Please note that there are some warnings about set-output as peter-evans/find-comment@v1 and peter-evans/create-or-update-comment@v1 is still using set-output, causing 4 warnings.

This is the workflow for unpublic-preview.yml. Similarly, there are the same errors.

@tlylt
Copy link
Collaborator

tlylt commented Apr 10, 2023

peter-evans/create-or-update-comment

possible to update our usage of those two actions?

@yucheng11122017
Copy link
Contributor Author

peter-evans/create-or-update-comment

possible to update our usage of those two actions?

Yes sure. In this PR?

@tlylt
Copy link
Collaborator

tlylt commented Apr 13, 2023

peter-evans/create-or-update-comment

possible to update our usage of those two actions?

Yes sure. In this PR?

Yes pls

@yucheng11122017
Copy link
Contributor Author

Hi @tlylt, updated in these two commits.

Please see the workflow for build fork, preview fork, unpublish site and action.yml

@tlylt tlylt changed the title Replace set-output Replace deprecated set-output with GITHUB_OUTPUT Apr 13, 2023
@tlylt tlylt merged commit c1ad53f into MarkBind:master Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade peter-evans actions version Replace set-output and save-state

3 participants