|
1 | | -# Workflows |
2 | | - |
3 | | -This repository contains reusable workflows and scripts to be used with GitHub Actions. |
4 | | - |
5 | | -## Updater |
6 | | - |
7 | | -Dependency updater - see [updater.yml](.github/workflows/updater.yml) - updates dependencies to the latest published git tag. |
8 | | - |
9 | | -### Example workflow definition |
10 | | - |
11 | | -```yaml |
12 | | -name: Update Dependencies |
13 | | -on: |
14 | | - # Run every day. |
15 | | - schedule: |
16 | | - - cron: '0 3 * * *' |
17 | | - # And on on every PR merge so we get the updated dependencies ASAP, and to make sure the changelog doesn't conflict. |
18 | | - push: |
19 | | - branches: |
20 | | - - main |
21 | | -jobs: |
22 | | - # Update a git submodule |
23 | | - cocoa: |
24 | | - uses: getsentry/github-workflows/.github/workflows/updater.yml@v2 |
25 | | - with: |
26 | | - path: modules/sentry-cocoa |
27 | | - name: Cocoa SDK |
28 | | - pattern: '^1\.' # Limit to major version '1' |
29 | | - secrets: |
30 | | - api-token: ${{ secrets.CI_DEPLOY_KEY }} |
31 | | - |
32 | | - # Update a properties file |
33 | | - cli: |
34 | | - uses: getsentry/github-workflows/.github/workflows/updater.yml@v2 |
35 | | - with: |
36 | | - path: sentry-cli.properties |
37 | | - name: CLI |
38 | | - secrets: |
39 | | - api-token: ${{ secrets.CI_DEPLOY_KEY }} |
40 | | - |
41 | | - # Update using a custom shell script, see updater/scripts/update-dependency.ps1 for the required arguments |
42 | | - agp: |
43 | | - uses: getsentry/github-workflows/.github/workflows/updater.yml@v2 |
44 | | - with: |
45 | | - path: script.ps1 |
46 | | - name: Gradle Plugin |
47 | | - secrets: |
48 | | - api-token: ${{ secrets.CI_DEPLOY_KEY }} |
49 | | -``` |
50 | | -
|
51 | | -### Inputs |
52 | | -
|
53 | | -* `path`: Dependency path in the source repository, this can be either a submodule, a .properties file or a shell script. |
54 | | - * type: string |
55 | | - * required: true |
56 | | -* `name`: Name used in the PR title and the changelog entry. |
57 | | - * type: string |
58 | | - * required: true |
59 | | -* `pattern`: RegEx pattern that will be matched against available versions when picking the latest one. |
60 | | - * type: string |
61 | | - * required: false |
62 | | - * default: '' |
63 | | -* `changelog-entry`: Whether to add a changelog entry for the update. |
64 | | - * type: boolean |
65 | | - * required: false |
66 | | - * default: true |
67 | | -* `changelog-section`: Section header to attach the changelog entry to. |
68 | | - * type: string |
69 | | - * required: false |
70 | | - * default: Dependencies |
71 | | -* `runs-on`: GitHub Actions virtual environment name to run the udpater job on. |
72 | | - * type: string |
73 | | - * required: false |
74 | | - * default: ubuntu-latest |
75 | | -* `pr-strategy`: How to handle PRs. |
76 | | - Can be either of the following: |
77 | | - * `create` (default) - create a new PR for new dependency versions as they are released - maintainers may merge or close older PRs manually |
78 | | - * `update` - keep a single PR that gets updated with new dependency versions until merged - only the latest version update is available at any time |
79 | | - |
80 | | -### Secrets |
81 | | - |
82 | | -* `api-token`: GH authentication token to create PRs with & push. |
83 | | - If you provide the usual `${{ github.token }}`, no followup CI will run on the created PR. |
84 | | - If you want CI to run on the PRs created by the Updater, you need to provide custom user-specific auth token. |
85 | | - |
86 | | -## Danger |
87 | | - |
88 | | -Runs DangerJS on Pull Reqeusts in your repository. This uses custom set of rules defined in [this dangerfile](danger/dangerfile.js). |
89 | | - |
90 | | -```yaml |
91 | | -name: Danger |
92 | | -
|
93 | | -on: |
94 | | - pull_request: |
95 | | - types: [opened, synchronize, reopened, edited, ready_for_review] |
96 | | -
|
97 | | -jobs: |
98 | | - danger: |
99 | | - uses: getsentry/github-workflows/.github/workflows/danger.yml@v2 |
100 | | -``` |
| 1 | +Keep this branch, it's used by updater/tests/nonbot-commits.ps1 |
0 commit comments