renovatebot-pre-commit-hooks/.github/workflows/build.yml
renovate[bot] e9e3ba7bcf
chore(deps): update mikefarah/yq action to v4.52.5 (#4204)
| datasource  | package      | from    | to      |
| ----------- | ------------ | ------- | ------- |
| github-tags | mikefarah/yq | v4.52.4 | v4.52.5 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-26 02:26:14 +00:00

71 lines
1.9 KiB
YAML

name: build
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: .python-version
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run pre-commit
run: >-
pre-commit try-repo --all-files
--ref="${GITHUB_SHA}"
"${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
release:
if: ${{ github.ref == 'refs/heads/main' }}
needs: [test]
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get Renovate version
id: get-renovate-version
uses: mikefarah/yq@0f4fb8d35ec1a939d78dd6862f494d19ec589f19 # v4.52.5
with:
cmd: >-
yq eval
'.[]|select(.id=="renovate-config-validator")|.additional_dependencies[0]|split("@").[1]'
.pre-commit-hooks.yaml
- name: Create release
run: |
if ! gh release view "${TAG}" >/dev/null; then
gh release create "${TAG}" \
--notes "See https://github.com/renovatebot/renovate/releases/tag/${TAG} for more changes" \
--target "${TARGET}" \
--title "${TAG}"
else
echo 'release already exists'
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.get-renovate-version.outputs.result }}
TARGET: ${{ github.sha }}