website
website copied to clipboard
Updates to Daniel Ridge workflows
Overview
As developers we need to update the deprecated set-output
command in the Daniel Ridge workflows and update the version of Node, in order to comply with GitHub recommendations and ensure the continuing operation of the workflows. There is also an issue with the secret that must be resolved.
Details
-
The Daniel Ridge Bot repo check-ghpages-versions contains the scheduled workflows
check-gh-pages-version.yml
andcheck-ruby-version.yml
which automatically check the dependencies for the Docker image, and generate issues in the ops repository (github.com/hackforla/ops) if an update is required. -
The workflow had stopped running due to inactivity in the repository. #6266 was created to add a "keepalive" step to prevent the workflow from stopping in the future
-
However, even when the repository is active, the workflows do not behave as expected. See the Resources/Instructions section for a screenshot of a log depicting the current behavior. In addition, the following warnings are observed:
-
The
set-output
command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands -
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
-
-
Based on this comment https://github.com/danielridgebot/check-ghpages-versions/pull/21#issuecomment-2110968610, the secret name referenced in the workflows is incorrect and needs to be updated.
Action Items
- [x] Fork and clone the repository check-ghpages-versions.
- [x] Based on the guidelines in GitHub Actions: Deprecating save-state and set-output commands, update
.github/workflows/check-gh-pages-version.yml
and.github/workflows/check-ruby-version.yml
so that the result of the step 'Check for modified files is set using Environment files instead ofset-output
- [x] Based on the guidelines in GitHub Actions: Transitioning from Node 16 to Node 20 update the code to remove dependencies on Node 16. This will require replacing
actions/checkout@v3
withactions/checkout@v4
- [x] create a PAT in your repository, then a secret called test_Daniel_Ridge_PAT and modify each workflow to use that secret in place of GH_TOKEN: ${{ secrets.Daniel_Ridge_PAT }}
- [x] As described in How To Use section of the Keep-Alive Workflow documentation, workflow permissions must be set. Go to repository settings, Click on Actions > General. Update the "Workflow permissions" to "Read and write permissions". Click on save.
- [x] Test by running
.github/workflows/check-gh-pages-version.yml
and verify that the appropriate issues were created - [x] Restore the original secret
- [x] Create a PR in https://github.com/danielridgebot/check-ghpages-versions. Put this issue in "Questions/In Review" and apply the label "ready for dev lead".
Resources/Instructions
GHA log showing failed run
Check Github Pages Gem Version and Open New Issue on Change
Check Ruby Version and Open New Issue on Change
GitHub blog post - GitHub Actions: Deprecating save-state and set-output commands
GitHub Actions: Transitioning from Node 16 to Node 20
- This issue resulted from #6967