Skip to content

build(deps): bump github/codeql-action from 2.21.8 to 2.21.9 #11

build(deps): bump github/codeql-action from 2.21.8 to 2.21.9

build(deps): bump github/codeql-action from 2.21.8 to 2.21.9 #11

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@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
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@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.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
});