build(deps): bump step-security/harden-runner from 2.8.1 to 2.9.1 #89
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: version-reminder | |
on: | |
pull_request: | |
types: | |
- opened | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.repository }}/${{ github.workflow }}/${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
version-reminder: | |
name: version-reminder | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 1 | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
ref: master | |
- name: version-check | |
id: version_check | |
if: hashFiles('VERSION') | |
run: | | |
VERSION_FILE="VERSION" | |
setOutput() { | |
echo "${1}=${2}" >> "${GITHUB_OUTPUT}" | |
} | |
git fetch origin master | |
if ! git diff --unified=0 origin/master.. -- $VERSION_FILE | grep '^[+-]' | grep -i "version" >/dev/null | |
then | |
echo "remind bumping" | |
setOutput "remind" 'true' | |
else | |
echo "version is being BUMPED $(cat $VERSION_FILE)" | |
setOutput "remind" 'false' | |
fi | |
- name: version-reminder-comment | |
if: hashFiles('VERSION') && steps.version_check.outputs.remind == 'true' | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const backtick = '`'; | |
const body = ` | |
### :bulb: **Don't forget to bump the VERSION file** | |
By bumping the version in ${backtick}VERSION${backtick} file, we trigger a repo TAG and repo RELEASE, else nothing happens. | |
`.trim(); | |
github.rest.issues.createComment({ | |
issue_number: context.payload.pull_request.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body | |
}); |