mirror of
https://github.com/renovatebot/pre-commit-hooks.git
synced 2026-04-02 12:56:53 +00:00
| datasource | package | from | to | | ----------- | ---------------- | ------ | ------ | | github-tags | actions/checkout | v4.1.3 | v4.1.4 | Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
71 lines
1.9 KiB
YAML
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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
|
|
|
- name: Get Renovate version
|
|
id: get-renovate-version
|
|
uses: mikefarah/yq@c35ec752e38ea0c096d3c44e13cfc0797ac394d8 # v4.43.1
|
|
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 }}
|