|
| 1 | +# transitdata-shared-workflows |
| 2 | + |
| 3 | +Control and modify the GitHub Actions workflows of [Transitdata](https://github.com/HSLdevcom/transitdata) in one place. |
| 4 | + |
| 5 | +## TODO |
| 6 | + |
| 7 | +- Use branch `main` with tagged versions |
| 8 | +- Possibly create dummy test Java and TypeScript packages to test the workflow scripts. Or use `@main` for testing in one client repository before upgrading the version here. |
| 9 | +- Secure |
| 10 | + |
| 11 | + - If any inputs or vars are given by the user, sanitize them carefully! |
| 12 | + |
| 13 | + - For example, only use inputs via `env`. E.g. |
| 14 | + |
| 15 | + ```yaml |
| 16 | + - name: Run linter |
| 17 | + run: npx eslint "${TARGET}" |
| 18 | + env: |
| 19 | + TARGET: ${{ inputs.target-directory }} |
| 20 | + ``` |
| 21 | +
|
| 22 | + - That way `TARGET` is quoted as a single string. |
| 23 | + |
| 24 | + - Use only trusted sources of actions or audit every line of code yourself |
| 25 | + - Pin all used actions external to this repository |
| 26 | + - Add strict branch protection / ruleset rules |
| 27 | + |
| 28 | +- Add transitdata-common reusable workflow |
| 29 | +- Add transitdata Java client reusable workflow |
| 30 | +- Add transitdata TypeScript client reusable workflow |
| 31 | +- Refactor the same parts into composite actions if useful |
| 32 | +- Write documentation on how to use: |
| 33 | + - Recommend pinning with SHA1 and a version comment, e.g. |
| 34 | + immutable GitHub Actions (e.g. `uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6`) |
| 35 | + - Recommend using Dependabot |
| 36 | +- Enable Dependabot on this repository |
| 37 | +- Enable CodeQL, secret scanning and other static analysis and linting on this repository. |
| 38 | +- Possibly no auto-merge for this repository |
0 commit comments