Add bandit with ac commands and changelog track actions #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: New Changelog file | |
on: | |
pull_request: | |
jobs: | |
check-changelog: | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
env: | |
branch_name: ${{ github.event.pull_request.head.ref }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.base.ref }} | |
- name: ls base | |
run: | | |
cd changelogs/fragments/ | |
{ | |
echo "LS_BASE<<\n" | |
ls | |
echo "\n" | |
} >> "$GITHUB_ENV" | |
- name: Merge Changelogs | |
run: | | |
date > generated.txt | |
git config user.name github-actions | |
git config user.email [email protected] | |
git fetch | |
git checkout origin/"$branch_name" changelogs/fragments/ | |
- name: ls all | |
run: | | |
cd changelogs/fragments/ | |
{ | |
echo "LS_ALL<<\n" | |
ls | |
echo "\n" | |
} >> "$GITHUB_ENV" | |
- name: Check for new file | |
run: | | |
[ "${#LS_ALL}" -gt "${#LS_BASE}" ] || (echo "No new changelog file was found" && exit 1) |