Skip to content

Commit

Permalink
Add changie-validation job to lint workflow
Browse files Browse the repository at this point in the history
* Add `changie-validation` job to check for changie entries in `.changes/unreleased` directory
* Skip `changie-validation` job if `.changes` directory does not exist or if labels `no-changie-required` or `dependencies` are set
* Replace deprecated `set-output` command with `echo "{name}={value}" >> $GITHUB_OUTPUT`
* Add comment using gh cli if changie entry is required, ensuring only a single comment is made
* Map `GH_TOKEN` in `env` for `check_labels` and `validate_changie_entry` steps
  • Loading branch information
sheldonhull committed Aug 13, 2024
1 parent a6495b6 commit 32e4020
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ jobs:
echo "dependencies=true" >> $GITHUB_OUTPUT
fi
done
with:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Validate changie entry
id: validate_changie_entry
if: steps.check_changes_dir.outputs.changes_dir_exists == 'true' && steps.check_labels.outputs.no_changie_required == 'false' && steps.check_labels.outputs.dependencies == 'false'
run: |
if [ -z "$(ls -A .changes/unreleased)" ]; then
Expand All @@ -83,3 +86,6 @@ jobs:
else
echo "Changie entry found"
fi
with:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 32e4020

Please sign in to comment.