Pin package updates and installs #1489
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: Pull Request | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - release/* | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| ci: | |
| name: CI | |
| uses: ./.github/workflows/ci.yml | |
| check-packages: | |
| name: Check Packages | |
| runs-on: ${{vars.RUNS_ON}} | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{github.head_ref}} | |
| - name: Update packages | |
| id: updates | |
| run: bash .github/scripts/update-packages.sh | |
| - name: Determine commit author | |
| if: steps.updates.outputs.update-title | |
| id: author | |
| run: | | |
| USER_NAME="github-actions[bot]" | |
| USER_ID=$(gh api "/users/${USER_NAME}" --jq '.id') | |
| USER_EMAIL="${USER_ID}+${USER_NAME}@users.noreply.github.com" | |
| echo "commit-author=${USER_NAME} <${USER_EMAIL}>" >> "${GITHUB_OUTPUT}" | |
| env: | |
| GITHUB_TOKEN: ${{github.token}} | |
| - name: Push changes | |
| uses: peter-evans/create-pull-request@v8.1.0 | |
| with: | |
| token: ${{github.token}} | |
| commit-message: ${{steps.updates.outputs.update-title}} | |
| author: ${{steps.author.outputs.commit-author}} | |
| committer: ${{steps.author.outputs.commit-author}} | |
| add-paths: | | |
| packages/updates.txt | |
| packages/installs.txt | |
| base: ${{github.base_ref}} | |
| branch: auto/update-packages/pr-${{github.event.pull_request.number}} | |
| delete-branch: true | |
| title: ${{steps.updates.outputs.update-title}} | |
| body: ${{steps.updates.outputs.update-body}} | |
| labels: | | |
| dependencies | |
| auto | |
| label: | |
| name: Label | |
| runs-on: ${{vars.RUNS_ON}} | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Apply labels | |
| uses: actions/labeler@v6.0.1 |