chore(deps): Update sscheib/ansible-role-file_deployment-jekyll to v2… #3629
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: 'commitlint' | |
on: # yamllint disable-line rule:truthy | |
push: {} | |
pull_request: {} | |
permissions: | |
contents: 'read' | |
jobs: | |
commitlint: | |
runs-on: 'ubuntu-24.04' | |
permissions: | |
contents: 'read' | |
steps: | |
- name: 'Harden Runner' | |
uses: 'step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f' # v2.10.2 | |
with: | |
egress-policy: 'block' | |
allowed-endpoints: > | |
github.com:443 | |
nodejs.org:443 | |
registry.npmjs.org:443 | |
- name: 'Checkout the repository' | |
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: 'Install NodeJS' | |
uses: 'actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af' # v4.1.0 | |
with: | |
# renovate dep: datasource=npm depName=node | |
node-version: '20.18.1' | |
- name: 'Install commitlint' | |
shell: 'bash' | |
run: | | |
# fail if: | |
# - a variable is unbound | |
# - any command fails | |
# - a command in a pipe fails | |
# - a command in a sub-shell fails | |
set -Eeuo pipefail | |
# enable debug if runner runs in debug | |
[[ "${{ runner.debug }}" -ne 1 ]] || { | |
echo "INFO: Enabling bash trace"; | |
set -x; | |
}; | |
# renovate: datasource=npm | |
npm install [email protected] | |
# renovate: datasource=npm | |
npm install [email protected] | |
# renovate: datasource=npm | |
npm install [email protected] | |
- name: 'Validate current commit (last commit) with commitlint' | |
if: "github.event_name == 'push'" | |
shell: 'bash' | |
run: | | |
# fail if: | |
# - a variable is unbound | |
# - any command fails | |
# - a command in a pipe fails | |
# - a command in a sub-shell fails | |
set -Eeuo pipefail | |
# enable debug if runner runs in debug | |
[[ "${{ runner.debug }}" -ne 1 ]] || { | |
echo "INFO: Enabling bash trace"; | |
set -x; | |
}; | |
npx commitlint --last --verbose | |
- name: 'Validate pull request commits with commitlint' | |
if: "github.event_name == 'pull_request'" | |
shell: 'bash' | |
run: | | |
# fail if: | |
# - a variable is unbound | |
# - any command fails | |
# - a command in a pipe fails | |
# - a command in a sub-shell fails | |
set -Eeuo pipefail | |
# enable debug if runner runs in debug | |
[[ "${{ runner.debug }}" -ne 1 ]] || { | |
echo "INFO: Enabling bash trace"; | |
set -x; | |
}; | |
npx commitlint --from \ | |
${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} \ | |
--to ${{ github.event.pull_request.head.sha }} --verbose | |
... |