https://github.com/joshjohanning/github-actions-log-warning-checker
Bash script to search for workflow runs referencing deprecated workflow commands
https://github.com/joshjohanning/github-actions-log-warning-checker
actions github
Last synced: 10 months ago
JSON representation
Bash script to search for workflow runs referencing deprecated workflow commands
- Host: GitHub
- URL: https://github.com/joshjohanning/github-actions-log-warning-checker
- Owner: joshjohanning
- License: mit
- Created: 2023-02-27T18:09:10.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-01T21:53:47.000Z (over 2 years ago)
- Last Synced: 2025-03-24T22:13:46.539Z (10 months ago)
- Topics: actions, github
- Language: Shell
- Homepage:
- Size: 18.6 KB
- Stars: 8
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-actions-log-warning-checker
- In a list of repositories, run through recent[^1] workflow runs to see if there are any `set-output` / `save-state` [deprecated workflow command](https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/) or [deprecated Node.js 12 actions](https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/) warnings in the logs
- The script outputs the results to a specified CSV file (e.g.: `output.csv`)
- In the output CSV, there is a column to denote whether the warning was found in the latest workflow run or not
- In the output CSV, there is a column to denote which warning it is referencing (deprecated workflow command or deprecated Node.js 12 action)
## Usage
1. Run `gh auth login` to authenticate with GitHub CLI
2. Run `./generate-repos.sh > repos.csv`
- Modify list as needed
- Or create a list of repos in a csv file, ``, 1 per line, with a trailing empty line at the end of the file
3. Run: `./github-actions-log-warning-checker.sh repos.csv output.csv`
## Example Output
```csv
repo,workflow_name,workflow_url,finding,found_in_latest_workflow_run
joshjohanning-org/actions-linter-testing,CI,https://github.com/joshjohanning-org/actions-linter-testing/blob/main/.github/workflows/blank.yml,Workflow command,no
joshjohanning-org/actions-linter-testing,new-workflow,https://github.com/joshjohanning-org/actions-linter-testing/blob/main/.github/workflows/new-file.yml,Workflow command,yes
joshjohanning-org/actions-linter-testing,node12,https://github.com/joshjohanning-org/actions-linter-testing/blob/main/.github/workflows/node12.yml,Node.js 12 action,yes
```
## Sample repos.csv file to use for testing
You can use this `repos.csv` file for testing. It has a finding for a result for a deprecated Node.js 12 action as well as a deprecated workflow command.
```csv
joshjohanning-org/actions-linter-testing
joshjohanning-org/actions-linter-testing-clean
```
[^1]: Recent is defined as the last 2 workflow runs, modify `WORKFLOW_RUNS_TO_CHECK` as needed.