Skip to content

feat: switch to using YAML anchors to keep Action versions tidy #9

feat: switch to using YAML anchors to keep Action versions tidy

feat: switch to using YAML anchors to keep Action versions tidy #9

Workflow file for this run

---

Check failure on line 1 in .github/workflows/pre-commit.yml

View workflow run for this annotation

GitHub Actions / pre-commit

Invalid workflow file

The workflow is not valid. .github/workflows/pre-commit.yml: Anchors are not currently supported. Remove the anchor 'actions-checkout'
name: pre-commit
# Controls when the workflow will run
on:
pull_request:
paths:
- '.github/workflows/pre-commit.yml'
- '.pre-commit-config.yaml'
env:
actions-checkout-version: &actions-checkout actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
actions-setup-go-version: &actions-setup-go actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
actions-setup-python-version: &actions-setup-python actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
pre-commit-action-version: &pre-commit-action pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: *actions-checkout
with:
fetch-depth: 1
- uses: *actions-setup-python
with:
python-version: 3.11
# needed for pre-commit in nektos/act with https://github.com/scop/pre-commit-shfmt
- uses: *actions-setup-go
if: ${{ env.ACT }}
with:
go-version: '>=1.22.0'
- name: Lint the repository with pre-commit
uses: *pre-commit-action
# watch out for <https://github.com/pre-commit/action/issues/169>
with:
extra_args: >
--verbose
--show-diff-on-failure
--color=always
--all-files