Bump the npm-deps group across 1 directory with 8 updates #119
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: Update downstream | |
| on: | |
| pull_request: | |
| types: | |
| - closed | |
| jobs: | |
| update-downstream-repos: | |
| if: ${{ github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' }} | |
| environment: detsys-pr-bot | |
| name: Pull request detsys-ts update to ${{ github.repository_owner }}/${{ matrix.repo }} | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| repo: | |
| - flake-checker-action | |
| - magic-nix-cache-action | |
| - flakehub-push | |
| - flakehub-mirror | |
| - nix-installer-action | |
| - update-flake-lock | |
| env: | |
| REF: ${{ github.sha }} | |
| REF_URL: https://github.com/${{ github.repository }}/tree/${{ github.sha }} | |
| SOURCE_REPO: ${{ github.repository }} | |
| SOURCE_PR_NUMBER: ${{ github.event.pull_request.number }} | |
| SOURCE_PR_URL: ${{ github.event.pull_request.html_url }} | |
| BASE_REF: ${{ github.event.pull_request.base.sha }} | |
| DIFF_URL: https://github.com/${{ github.repository }}/compare/${{ github.event.pull_request.base.sha }}..${{ github.sha }} | |
| DIFF_FILE_URL: ${{ github.event.pull_request.diff_url }} | |
| GIT_USER: ${{ github.actor }} | |
| GIT_EMAIL: ${{ github.actor }}@users.noreply.github.com | |
| GIT_BRANCH: detsys-ts-update-${{ github.sha }} | |
| GIT_BASE: main | |
| GIT_HEAD: detsys-pr-bot:detsys-ts-update-${{ github.sha }} | |
| TARGET_REPO: ${{ github.repository_owner }}/${{ matrix.repo }} | |
| GH_TOKEN: ${{ secrets.detsys_pr_bot_token }} # for `gh pr create` | |
| steps: | |
| - name: Check out detsys-ts | |
| uses: actions/checkout@v6 | |
| with: | |
| path: current | |
| token: ${{ env.GH_TOKEN }} | |
| - name: Get last detsys-ts commit message | |
| id: commit-msg | |
| working-directory: current | |
| run: | | |
| MSG=$(git show -s --format="%s" ${{ github.sha }}) | |
| echo "msg=${MSG}" >> $GITHUB_OUTPUT | |
| - name: Check out ${{ env.TARGET_REPO }} | |
| uses: actions/checkout@v6 | |
| with: | |
| path: target | |
| repository: ${{ env.TARGET_REPO }} | |
| token: ${{ env.GH_TOKEN }} | |
| - name: Install Nix | |
| uses: DeterminateSystems/determinate-nix-action@v3 | |
| - name: Set up FlakeHub Cache | |
| uses: DeterminateSystems/flakehub-cache-action@main | |
| - name: Configure Git for ${{ env.GIT_USER }} | |
| working-directory: target | |
| run: | | |
| git config user.name "${{ env.GIT_USER }}" | |
| git config user.email "${{ env.GIT_EMAIL }}" | |
| - name: Make sure the repo is forked | |
| working-directory: target | |
| run: | | |
| gh repo fork | |
| - name: Update flake inputs | |
| working-directory: target | |
| run: | | |
| if [ -f ./flake.nix ]; then | |
| nix flake update --commit-lock-file | |
| fi | |
| - name: Update `detsys-ts` dependency for ${{ env.TARGET_REPO }} to ref `${{ env.REF }}` | |
| working-directory: target | |
| run: | | |
| if [ -f ./pnpm-lock.yaml ]; then | |
| nix develop --command pnpm update | |
| nix develop --command pnpm run all | |
| else | |
| nix develop --command npm update | |
| nix develop --command npm run all | |
| fi | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v8 | |
| env: | |
| COMMIT_MSG: ${{ steps.commit-msg.outputs.msg }} | |
| with: | |
| path: target | |
| token: ${{ secrets.detsys_pr_bot_token }} | |
| title: "Update `detsys-ts`: ${{ env.COMMIT_MSG }}" | |
| commit-message: "Update `detsys-ts` for: `${{ env.COMMIT_MSG }}` (`${{ env.REF }}`)" | |
| body: | | |
| Bump [`detsys-ts`](${{ env.SOURCE_REPO }}) to the latest `HEAD` and regenerate application bundle. | |
| * Source ref: [`${{ env.REF }}`](${{ env.REF_URL }}) | |
| * Source pull request: [`${{ env.SOURCE_REPO }}#${{ env.SOURCE_PR_NUMBER }}`](${{ env.SOURCE_PR_URL }}) | |
| * Source diff: [`${{ env.BASE_REF }}..${{ env.REF }}`](${{ env.DIFF_URL }}) | |
| * Diff file: [`${{ env.SOURCE_PR_NUMBER }}.diff`](${{ env.DIFF_FILE_URL }}) | |
| push-to-fork: detsys-pr-bot/${{ matrix.repo }} | |
| branch: "${{ env.GIT_BRANCH }}" | |
| base: ${{ env.GIT_BASE }} | |
| draft: false |