mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
Since GCP artifact registry is cost-prohibitive, we can use the GitHub Actions Cache for docker layer caching for CI builds. See https://docs.docker.com/build/cache/backends/gha/ --------- Signed-off-by: Jamil <jamilbk@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
35 lines
1.1 KiB
Markdown
35 lines
1.1 KiB
Markdown
# CI Tips and Tricks
|
|
|
|
## Rotating signing secrets
|
|
|
|
- Apple: see [../swift/apple/README.md](../swift/apple/README.md)
|
|
- Android: see [../kotlin/android/README.md](../kotlin/android/README.md)
|
|
- Windows: see [../rust/gui-client/README.md](../rust/gui-client/README.md)
|
|
|
|
## Batch-deleting workflow runs
|
|
|
|
Manually disable the workflows to be cleaned up, then run this:
|
|
|
|
```bash
|
|
org=firezone
|
|
repo=firezone
|
|
|
|
# Get workflow IDs with status "disabled_manually"
|
|
workflow_ids=($(gh api repos/$org/$repo/actions/workflows --paginate | jq '.workflows[] | select(.["state"] | contains("disabled_manually")) | .id'))
|
|
|
|
for workflow_id in "${workflow_ids[@]}"
|
|
do
|
|
echo "Listing runs for the workflow ID $workflow_id"
|
|
run_ids=( $(gh api repos/$org/$repo/actions/workflows/$workflow_id/runs --paginate | jq '.workflow_runs[].id') )
|
|
for run_id in "${run_ids[@]}"
|
|
do
|
|
echo "Deleting Run ID $run_id"
|
|
gh api repos/$org/$repo/actions/runs/$run_id -X DELETE >/dev/null
|
|
done
|
|
done
|
|
```
|
|
|
|
## Adding a new repository to Google Cloud workload identity
|
|
|
|
Use Terraform configuration for this. See the `iam.tf` configuration in the https://github.com/firezone/infra repo for an example.
|