feat(deps): update renovate to v42.37.1 #5277
Workflow file for this run
This file contains hidden or 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: Main | |
| on: | |
| merge_group: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: 'bash -Eeuxo pipefail {0}' | |
| jobs: | |
| setup: | |
| env: | |
| DOCS_BUILD_PATH: ./docs | |
| name: Setup | |
| outputs: | |
| dist-changed: ${{ contains(steps.filter.outputs.changes, 'dist-changed') }} | |
| docs-build-path: ${{ env.DOCS_BUILD_PATH }} | |
| docs-changed: ${{ contains(steps.filter.outputs.changes, 'docs-changed') }} | |
| node-version: ${{ steps.set-node-version.outputs.node-version }} | |
| should-check: ${{ contains(steps.filter.outputs.changes, 'should-check') }} | |
| src-changed: ${{ contains(steps.filter.outputs.changes, 'src-changed') }} | |
| renovate-changed: ${{ contains(steps.filter.outputs.changes, 'renovate-changed') }} | |
| permissions: | |
| pull-requests: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - id: set-node-version | |
| name: Setup Node.js at version from package.json | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| cache: pnpm | |
| node-version-file: package.json | |
| - run: pnpm bootstrap | |
| - id: filter | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| with: | |
| filters: .github/filters.yaml | |
| check: | |
| if: ${{ needs.setup.outputs.should-check == 'true' }} | |
| name: Check | |
| needs: [setup] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| cache: pnpm | |
| node-version: ${{ needs.setup.outputs.node-version }} | |
| - name: Install dependencies | |
| run: pnpm bootstrap | |
| - name: Build | |
| run: pnpm build | |
| - name: Check | |
| run: pnpm check | |
| - name: Test docs preview | |
| run: | | |
| pnpm run preview & | |
| PREVIEW_PID=$! | |
| sleep 5 | |
| curl -f http://localhost:4321/renovate-action || exit 1 | |
| kill $PREVIEW_PID | |
| working-directory: ${{ needs.setup.outputs.docs-build-path }} | |
| test: | |
| if: ${{ github.event_name == 'push' || needs.setup.outputs.src-changed == 'true' }} | |
| name: Test | |
| needs: [setup] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| cache: pnpm | |
| node-version: ${{ needs.setup.outputs.node-version }} | |
| - name: Install dependencies | |
| run: pnpm bootstrap | |
| - run: pnpm test | |
| # Don't run a self test if Renovate configuration has changed as it will be run in the Renovate job | |
| - if: github.repository_owner == 'bfra-me' && github.ref_name != github.event.repository.default_branch && needs.setup.outputs.renovate-changed != 'true' | |
| name: Self-test with default templates enabled | |
| uses: ./ | |
| with: | |
| dry-run: true | |
| log-level: debug | |
| renovate-app-id: ${{ secrets.APPLICATION_ID }} | |
| renovate-app-private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }} | |
| enable-custom-templates: true | |
| print-config: true | |
| # Test template functionality with templates disabled | |
| - if: github.repository_owner == 'bfra-me' && github.ref_name != github.event.repository.default_branch && needs.setup.outputs.renovate-changed != 'true' | |
| name: Self-test with templates disabled | |
| uses: ./ | |
| with: | |
| dry-run: true | |
| log-level: debug | |
| renovate-app-id: ${{ secrets.APPLICATION_ID }} | |
| renovate-app-private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }} | |
| enable-custom-templates: false | |
| print-config: true | |
| # Test template functionality with custom template inputs | |
| - if: github.repository_owner == 'bfra-me' && github.ref_name != github.event.repository.default_branch && needs.setup.outputs.renovate-changed != 'true' | |
| name: Self-test with custom templates | |
| uses: ./ | |
| with: | |
| dry-run: true | |
| log-level: debug | |
| renovate-app-id: ${{ secrets.APPLICATION_ID }} | |
| renovate-app-private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }} | |
| pr-header: | | |
| <!-- Custom test header for ${{ github.repository }} --> | |
| 🧪 **Test Mode**: This is a custom PR header for testing template functionality. | |
| pr-footer: | | |
| --- | |
| 🔧 **Custom Footer**: Template testing in progress for run ${{ github.run_id }}. | |
| dependency-dashboard-header: | | |
| <!-- Custom test dashboard header --> | |
| 🧪 **Test Dashboard**: Custom template validation for ${{ github.repository }} | |
| dependency-dashboard-footer: | | |
| --- | |
| 🔧 **Test Footer**: Template functionality validation complete. | |
| enable-custom-templates: true | |
| print-config: true | |
| # Test analytics collection in dry-run mode | |
| - if: github.repository_owner == 'bfra-me' && github.ref_name != github.event.repository.default_branch && needs.setup.outputs.renovate-changed != 'true' | |
| name: Self-test analytics collection (dry-run) | |
| uses: ./ | |
| with: | |
| dry-run: true | |
| log-level: debug | |
| renovate-app-id: ${{ secrets.APPLICATION_ID }} | |
| renovate-app-private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }} | |
| enable-analytics: true | |
| analytics-collection-level: debug | |
| env: | |
| ANALYTICS_TEST_MODE: 'true' | |
| build: | |
| if: ${{ github.event_name == 'push' || needs.setup.outputs.src-changed == 'true' }} | |
| name: Build | |
| needs: [setup, check, test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| cache: pnpm | |
| node-version: ${{ needs.setup.outputs.node-version }} | |
| - name: Install dependencies | |
| run: pnpm bootstrap | |
| - name: Rebuild the dist/ directory | |
| run: pnpm build | |
| - if: ${{ needs.setup.outputs.dist-changed == 'true' }} | |
| name: Compare the expected and actual dist/ directories | |
| run: | | |
| if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | |
| echo "Detected uncommitted changes after build. See status below:" | |
| git diff --text | |
| exit 1 | |
| fi | |
| id: diff | |
| # If index.js was different than expected, upload the expected version as an artifact | |
| - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| if: ${{ failure() && steps.diff.conclusion == 'failure' }} | |
| with: | |
| name: dist | |
| path: dist/ | |
| build-analytics-dashboard: | |
| if: ${{ github.event_name == 'workflow_dispatch' || needs.setup.outputs.docs-changed == 'true' }} | |
| name: Build Analytics Dashboard | |
| needs: [setup, check] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| cache: pnpm | |
| node-version: ${{ needs.setup.outputs.node-version }} | |
| - name: Install dependencies | |
| run: pnpm bootstrap | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | |
| - name: Build with Astro | |
| run: | | |
| pnpm --filter ${{ needs.setup.outputs.docs-build-path }} run build \ | |
| --site "${{ steps.pages.outputs.origin }}" \ | |
| --base "${{ steps.pages.outputs.base_path }}" | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 | |
| with: | |
| path: ${{ needs.setup.outputs.docs-build-path }}/dist | |
| deploy-pages: | |
| name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/main' | |
| concurrency: | |
| group: deploy | |
| cancel-in-progress: true | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy-to-pages.outputs.page_url }} | |
| needs: [build-analytics-dashboard] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Pages | |
| uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | |
| - name: Deploy to GitHub Pages | |
| id: deploy-to-pages | |
| uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 | |
| release: | |
| env: | |
| DRY_RUN: ${{ github.ref_name != github.event.repository.default_branch }} | |
| RELEASE_BRANCH: release | |
| name: Release | |
| needs: [setup, build] | |
| outputs: | |
| commit: ${{ steps.merge.outputs.commit }} | |
| published: ${{ env.DRY_RUN != 'true' && steps.semantic-release.outputs.new-release-published }} | |
| version: ${{ steps.semantic-release.outputs.version }} | |
| permissions: | |
| contents: write | |
| id-token: write | |
| issues: write | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: get-app-token | |
| name: Get GitHub App Installation Token | |
| uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0 | |
| with: | |
| app-id: ${{ secrets.APPLICATION_ID }} | |
| private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner}} | |
| - id: get-user-id | |
| name: Get GitHub App User ID and Setup Git user | |
| env: | |
| GH_TOKEN: ${{ steps.get-app-token.outputs.token }} | |
| run: | | |
| name="${{ steps.get-app-token.outputs.app-slug }}[bot]" | |
| user_id=$(gh api "/users/${name}" --jq .id) | |
| email="${user_id}+${name}@users.noreply.github.com" | |
| echo "user-email=${email}" >> "$GITHUB_OUTPUT" | |
| echo "user-name=${name}" >> "$GITHUB_OUTPUT" | |
| git config --global user.email "${email}" | |
| git config --global user.name "${name}" | |
| - name: Checkout `${{ env.RELEASE_BRANCH }}` release branch | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| filter: blob:none | |
| ref: ${{ env.RELEASE_BRANCH }} | |
| show-progress: false | |
| token: ${{ steps.get-app-token.outputs.token }} | |
| - if: ${{ github.event_name == 'pull_request' }} | |
| name: Fetch PR | |
| run: git fetch origin +${{ github.sha }}:${{ github.ref }} | |
| - id: merge | |
| name: Merge `main` into `${{ env.RELEASE_BRANCH }}` release | |
| run: | | |
| git merge --no-ff -Xtheirs -m 'skip: merge (${{ github.sha }}) [skip release]' ${{ github.sha }} | |
| echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
| - if: env.DRY_RUN != 'true' | |
| name: Push `${{ env.RELEASE_BRANCH }}` branch | |
| run: git push origin ${{ env.RELEASE_BRANCH }}:${{ env.RELEASE_BRANCH }} | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| cache: pnpm | |
| node-version: ${{ needs.setup.outputs.node-version }} | |
| - name: Install dependencies | |
| run: pnpm bootstrap --frozen-lockfile | |
| - if: env.DRY_RUN != 'true' | |
| name: Build release | |
| run: pnpm build | |
| - name: Semantic Release | |
| id: semantic-release | |
| env: | |
| GIT_AUTHOR_EMAIL: ${{ steps.get-user-id.outputs.user-email }} | |
| GIT_AUTHOR_NAME: ${{ steps.get-user-id.outputs.user-name }} | |
| GIT_COMMITTER_EMAIL: ${{ steps.get-user-id.outputs.user-email }} | |
| GIT_COMMITTER_NAME: ${{ steps.get-user-id.outputs.user-name }} | |
| GITHUB_TOKEN: ${{ steps.get-app-token.outputs.token }} | |
| LOG_LEVEL: debug | |
| run: | | |
| export GITHUB_REF=refs/heads/${{ env.RELEASE_BRANCH }} GITHUB_SHA=${{ steps.merge.outputs.commit }} | |
| pnpm semantic-release --dry-run ${{ env.DRY_RUN }} --ci ${{ env.DRY_RUN != 'true' }} | |
| - name: Push Release Branch To Major Branch | |
| if: ${{ env.DRY_RUN != 'true' && steps.semantic-release.outputs.new-release-published == 'true' }} | |
| env: | |
| GH_REPO: ${{ github.repository }} | |
| GH_TOKEN: ${{ steps.get-app-token.outputs.token }} | |
| run: | | |
| # Update the major branch reference to the new release tag | |
| version=${{ steps.semantic-release.outputs.new-release-version }} | |
| sha=$(git rev-parse HEAD) | |
| branch_name=v$(echo ${version} | cut -d . -f 1) | |
| ref=refs/heads/${branch_name} | |
| if [[ "$(gh api repos/{owner}/{repo}/git/ref/heads/${branch_name} 2>&1)" =~ "Not Found" ]]; then | |
| gh api -X POST repos/{owner}/{repo}/git/refs -f ref=${ref} -f sha=$sha | |
| else | |
| gh api -X PATCH repos/{owner}/{repo}/git/${ref} -f sha=$sha -F force=true | |
| fi | |
| trigger-org-renovate: | |
| name: Dispatch Renovate workflow in the .github repository | |
| if: github.repository == 'bfra-me/renovate-action' && needs.release.outputs.published == 'true' | |
| needs: release | |
| secrets: inherit | |
| uses: bfra-me/.github/.github/workflows/trigger-org-renovate.yaml@0f93d1e3fb7bf82a17ceb91667821cf53637883b # v4.3.8 |