ci: Improve update-deps workflow triggers and permissions (#101) #627
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 Dependencies | |
on: | |
# Run every day. | |
schedule: | |
- cron: '0 3 * * *' | |
# Allow a manual trigger to be able to run the update when there are new dependencies or after a PR merge to resolve CHANGELOG conflicts. | |
workflow_dispatch: | |
# And on every PR merge so we get the updated dependencies ASAP, and to make sure the changelog doesn't conflict. | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write # To modify files and create commits | |
pull-requests: write # To create and update pull requests | |
actions: write # To cancel previous workflow runs | |
jobs: | |
deps: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Dotnet SDK | |
path: dependencies/Sentry.properties | |
- name: PowerShell Test v7.4 | |
path: tests/test-pwsh-7.4.props | |
pattern: '^v7\.4\.\d+$' | |
- name: PowerShell Test v7.5 | |
path: tests/test-pwsh-7.5.props | |
pattern: '^7\.5\.\d+$' | |
- name: PowerShell Test latest | |
path: tests/test-pwsh-latest.props | |
steps: | |
- uses: getsentry/github-workflows/updater@v3 | |
with: | |
name: ${{ matrix.name }} | |
path: ${{ matrix.path }} | |
pr-strategy: update | |
ssh-key: ${{ secrets.CI_DEPLOY_KEY }} | |
pattern: ${{ matrix.pattern || '' }} | |