|
1 | | -# Workflows |
| 1 | +# GitHub Workflows |
2 | 2 |
|
3 | | -This repository contains reusable workflows and scripts to be used with GitHub Actions. |
| 3 | +This repository contains composite actions and scripts to be used with GitHub Actions. |
4 | 4 |
|
5 | | -## Updater |
| 5 | +## Composite Actions |
6 | 6 |
|
7 | | -Dependency updater - see [updater.yml](.github/workflows/updater.yml) - updates dependencies to the latest published git tag. |
| 7 | +### Updater |
8 | 8 |
|
9 | | -### Example workflow definition |
| 9 | +Dependency updater - updates dependencies to the latest published git tag and creates/updates PRs. |
10 | 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 }} |
| 11 | +**[📖 View full documentation →](updater/README.md)** |
31 | 12 |
|
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 }} |
| 13 | +### Danger |
40 | 14 |
|
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 }} |
| 15 | +Runs DangerJS on Pull Requests with a pre-configured set of rules. |
49 | 16 |
|
50 | | - # Update a CMake FetchContent dependency with auto-detection (single dependency only) |
51 | | - sentry-native: |
52 | | - uses: getsentry/github-workflows/.github/workflows/updater.yml@v2 |
53 | | - with: |
54 | | - path: vendor/sentry-native.cmake |
55 | | - name: Sentry Native SDK |
56 | | - secrets: |
57 | | - api-token: ${{ secrets.CI_DEPLOY_KEY }} |
| 17 | +**[📖 View full documentation →](danger/README.md)** |
58 | 18 |
|
59 | | - # Update a CMake FetchContent dependency with explicit dependency name |
60 | | - deps: |
61 | | - uses: getsentry/github-workflows/.github/workflows/updater.yml@v2 |
62 | | - with: |
63 | | - path: vendor/dependencies.cmake#googletest |
64 | | - name: GoogleTest |
65 | | - secrets: |
66 | | - api-token: ${{ secrets.CI_DEPLOY_KEY }} |
67 | | -``` |
| 19 | +## Legacy Reusable Workflows (v2) |
68 | 20 |
|
69 | | -### Inputs |
| 21 | +> ⚠️ **Deprecated**: Reusable workflows have been converted to composite actions in v3. Please migrate to the composite actions above. |
70 | 22 |
|
71 | | -* `path`: Dependency path in the source repository. Supported formats: |
72 | | - * Submodule path |
73 | | - * Properties file (`.properties`) |
74 | | - * Shell script (`.ps1`, `.sh`) |
75 | | - * CMake file with FetchContent: |
76 | | - * `path/to/file.cmake#DepName` - specify dependency name |
77 | | - * `path/to/file.cmake` - auto-detection (single dependency only) |
78 | | - * type: string |
79 | | - * required: true |
80 | | -* `name`: Name used in the PR title and the changelog entry. |
81 | | - * type: string |
82 | | - * required: true |
83 | | -* `pattern`: RegEx pattern that will be matched against available versions when picking the latest one. |
84 | | - * type: string |
85 | | - * required: false |
86 | | - * default: '' |
87 | | -* `changelog-entry`: Whether to add a changelog entry for the update. |
88 | | - * type: boolean |
89 | | - * required: false |
90 | | - * default: true |
91 | | -* `changelog-section`: Section header to attach the changelog entry to. |
92 | | - * type: string |
93 | | - * required: false |
94 | | - * default: Dependencies |
95 | | -* `runs-on`: GitHub Actions virtual environment name to run the udpater job on. |
96 | | - * type: string |
97 | | - * required: false |
98 | | - * default: ubuntu-latest |
99 | | -* `pr-strategy`: How to handle PRs. |
100 | | - Can be either of the following: |
101 | | - * `create` (default) - create a new PR for new dependency versions as they are released - maintainers may merge or close older PRs manually |
102 | | - * `update` - keep a single PR that gets updated with new dependency versions until merged - only the latest version update is available at any time |
103 | | - |
104 | | -### Secrets |
105 | | - |
106 | | -* `api-token`: GH authentication token to create PRs with & push. |
107 | | - If you provide the usual `${{github.token}}`, no followup CI will run on the created PR. |
108 | | - If you want CI to run on the PRs created by the Updater, you need to provide custom user-specific auth token. |
109 | | - |
110 | | -## Danger |
111 | | - |
112 | | -Runs DangerJS on Pull Reqeusts in your repository. This uses custom set of rules defined in [this dangerfile](danger/dangerfile.js). |
113 | | - |
114 | | -```yaml |
115 | | -name: Danger |
116 | | -
|
117 | | -on: |
118 | | - pull_request: |
119 | | - types: [opened, synchronize, reopened, edited, ready_for_review, labeled, unlabeled] |
120 | | -
|
121 | | -jobs: |
122 | | - danger: |
123 | | - uses: getsentry/github-workflows/.github/workflows/danger.yml@v2 |
124 | | -``` |
| 23 | +For v2 migration guide and breaking changes, see [CHANGELOG.md](CHANGELOG.md#3.0.0). |
0 commit comments