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@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0 - name: Set up Python uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4.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@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0 - name: Get Renovate version id: get-renovate-version uses: mikefarah/yq@ffe635f9437c0115155fb02a314bf2e0a206e760 # tag=v4.28.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 }}