From 30355f742b3556bc3da9d1b84f3f2a74e79e6b43 Mon Sep 17 00:00:00 2001 From: Bassem Dghaidi <568794+Link-@users.noreply.github.com> Date: Mon, 15 May 2023 14:31:18 +0200 Subject: [PATCH] Apply naming convention to workflows (#2581) Co-authored-by: John Sudol <24583161+johnsudol@users.noreply.github.com> --- ...lish-chart.yaml => arc-publish-chart.yaml} | 5 ++-- .../{publish-arc.yaml => arc-publish.yaml} | 2 +- ...-runners.yaml => arc-release-runners.yaml} | 4 +-- ...yaml => arc-update-runners-scheduled.yaml} | 2 +- ...ate-chart.yaml => arc-validate-chart.yaml} | 4 +-- ...runners.yaml => arc-validate-runners.yaml} | 2 +- ...-test-linux-vm.yaml => gha-e2e-tests.yaml} | 2 +- ...-scale-set.yaml => gha-publish-chart.yaml} | 4 +-- ...gha-chart.yaml => gha-validate-chart.yaml} | 6 ++-- ...canary.yaml => global-publish-canary.yaml} | 28 +++++++++---------- ...run-codeql.yaml => global-run-codeql.yaml} | 0 ...yaml => global-run-first-interaction.yaml} | 2 +- .../{run-stale.yaml => global-run-stale.yaml} | 0 .../2023-02-02-automate-runner-updates.md | 4 +-- docs/adrs/2023-03-17-workflow-improvements.md | 2 +- 15 files changed, 34 insertions(+), 33 deletions(-) rename .github/workflows/{publish-chart.yaml => arc-publish-chart.yaml} (98%) rename .github/workflows/{publish-arc.yaml => arc-publish.yaml} (99%) rename .github/workflows/{release-runners.yaml => arc-release-runners.yaml} (97%) rename .github/workflows/{update-runners.yaml => arc-update-runners-scheduled.yaml} (99%) rename .github/workflows/{validate-chart.yaml => arc-validate-chart.yaml} (96%) rename .github/workflows/{validate-runners.yaml => arc-validate-runners.yaml} (97%) rename .github/workflows/{e2e-test-linux-vm.yaml => gha-e2e-tests.yaml} (99%) rename .github/workflows/{publish-runner-scale-set.yaml => gha-publish-chart.yaml} (97%) rename .github/workflows/{validate-gha-chart.yaml => gha-validate-chart.yaml} (95%) rename .github/workflows/{publish-canary.yaml => global-publish-canary.yaml} (86%) rename .github/workflows/{run-codeql.yaml => global-run-codeql.yaml} (100%) rename .github/workflows/{run-first-interaction.yaml => global-run-first-interaction.yaml} (97%) rename .github/workflows/{run-stale.yaml => global-run-stale.yaml} (100%) diff --git a/.github/workflows/publish-chart.yaml b/.github/workflows/arc-publish-chart.yaml similarity index 98% rename from .github/workflows/publish-chart.yaml rename to .github/workflows/arc-publish-chart.yaml index 7e98a765..54785bbc 100644 --- a/.github/workflows/publish-chart.yaml +++ b/.github/workflows/arc-publish-chart.yaml @@ -1,4 +1,4 @@ -name: Publish Helm Chart +name: Publish ARC Helm Charts # Revert to https://github.com/actions-runner-controller/releases#releases # for details on why we use this approach @@ -8,7 +8,7 @@ on: - master paths: - 'charts/**' - - '.github/workflows/publish-chart.yaml' + - '.github/workflows/arc-publish-chart.yaml' - '!charts/actions-runner-controller/docs/**' - '!charts/gha-runner-scale-set-controller/**' - '!charts/gha-runner-scale-set/**' @@ -171,6 +171,7 @@ jobs: --owner "$(echo ${{ github.repository }} | cut -d '/' -f 1)" \ --git-repo "$(echo ${{ github.repository }} | cut -d '/' -f 2)" \ --index-path ${{ github.workspace }}/index.yaml \ + --token ${{ secrets.GITHUB_TOKEN }} \ --push \ --pages-branch 'gh-pages' \ --pages-index-path 'index.yaml' diff --git a/.github/workflows/publish-arc.yaml b/.github/workflows/arc-publish.yaml similarity index 99% rename from .github/workflows/publish-arc.yaml rename to .github/workflows/arc-publish.yaml index 4c18c255..fb23500d 100644 --- a/.github/workflows/publish-arc.yaml +++ b/.github/workflows/arc-publish.yaml @@ -1,4 +1,4 @@ -name: Publish ARC +name: Publish ARC Image # Revert to https://github.com/actions-runner-controller/releases#releases # for details on why we use this approach diff --git a/.github/workflows/release-runners.yaml b/.github/workflows/arc-release-runners.yaml similarity index 97% rename from .github/workflows/release-runners.yaml rename to .github/workflows/arc-release-runners.yaml index ca39e185..8adad96a 100644 --- a/.github/workflows/release-runners.yaml +++ b/.github/workflows/arc-release-runners.yaml @@ -1,4 +1,4 @@ -name: Release Runner Images +name: Release ARC Runner Images # Revert to https://github.com/actions-runner-controller/releases#releases # for details on why we use this approach @@ -10,7 +10,7 @@ on: - 'master' paths: - 'runner/VERSION' - - '.github/workflows/release-runners.yaml' + - '.github/workflows/arc-release-runners.yaml' env: # Safeguard to prevent pushing images to registeries after build diff --git a/.github/workflows/update-runners.yaml b/.github/workflows/arc-update-runners-scheduled.yaml similarity index 99% rename from .github/workflows/update-runners.yaml rename to .github/workflows/arc-update-runners-scheduled.yaml index 1fc896ec..1fb1153b 100644 --- a/.github/workflows/update-runners.yaml +++ b/.github/workflows/arc-update-runners-scheduled.yaml @@ -1,6 +1,6 @@ # This workflows polls releases from actions/runner and in case of a new one it # updates files containing runner version and opens a pull request. -name: Update runners +name: Runner Updates Check (Scheduled Job) on: schedule: diff --git a/.github/workflows/validate-chart.yaml b/.github/workflows/arc-validate-chart.yaml similarity index 96% rename from .github/workflows/validate-chart.yaml rename to .github/workflows/arc-validate-chart.yaml index 5475649c..6adccc3e 100644 --- a/.github/workflows/validate-chart.yaml +++ b/.github/workflows/arc-validate-chart.yaml @@ -6,7 +6,7 @@ on: - master paths: - 'charts/**' - - '.github/workflows/validate-chart.yaml' + - '.github/workflows/arc-validate-chart.yaml' - '!charts/actions-runner-controller/docs/**' - '!**.md' - '!charts/gha-runner-scale-set-controller/**' @@ -14,7 +14,7 @@ on: push: paths: - 'charts/**' - - '.github/workflows/validate-chart.yaml' + - '.github/workflows/arc-validate-chart.yaml' - '!charts/actions-runner-controller/docs/**' - '!**.md' - '!charts/gha-runner-scale-set-controller/**' diff --git a/.github/workflows/validate-runners.yaml b/.github/workflows/arc-validate-runners.yaml similarity index 97% rename from .github/workflows/validate-runners.yaml rename to .github/workflows/arc-validate-runners.yaml index cab0eb70..42380e91 100644 --- a/.github/workflows/validate-runners.yaml +++ b/.github/workflows/arc-validate-runners.yaml @@ -1,4 +1,4 @@ -name: Validate Runners +name: Validate ARC Runners on: pull_request: diff --git a/.github/workflows/e2e-test-linux-vm.yaml b/.github/workflows/gha-e2e-tests.yaml similarity index 99% rename from .github/workflows/e2e-test-linux-vm.yaml rename to .github/workflows/gha-e2e-tests.yaml index 35dafedd..65230a2e 100644 --- a/.github/workflows/e2e-test-linux-vm.yaml +++ b/.github/workflows/gha-e2e-tests.yaml @@ -1,4 +1,4 @@ -name: CI ARC E2E Linux VM Test +name: (gha) E2E Tests on: push: diff --git a/.github/workflows/publish-runner-scale-set.yaml b/.github/workflows/gha-publish-chart.yaml similarity index 97% rename from .github/workflows/publish-runner-scale-set.yaml rename to .github/workflows/gha-publish-chart.yaml index 12029e9a..f0e01077 100644 --- a/.github/workflows/publish-runner-scale-set.yaml +++ b/.github/workflows/gha-publish-chart.yaml @@ -1,4 +1,4 @@ -name: Publish Runner Scale Set Controller Charts +name: (gha) Publish Helm Charts on: workflow_dispatch: @@ -101,7 +101,7 @@ jobs: - name: Job summary run: | - echo "The [publish-runner-scale-set.yaml](https://github.com/actions/actions-runner-controller/blob/main/.github/workflows/publish-runner-scale-set.yaml) workflow run was completed successfully!" >> $GITHUB_STEP_SUMMARY + echo "The [gha-publish-chart.yaml](https://github.com/actions/actions-runner-controller/blob/main/.github/workflows/gha-publish-chart.yaml) workflow run was completed successfully!" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "**Parameters:**" >> $GITHUB_STEP_SUMMARY echo "- Ref: ${{ steps.resolve_parameters.outputs.resolvedRef }}" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/validate-gha-chart.yaml b/.github/workflows/gha-validate-chart.yaml similarity index 95% rename from .github/workflows/validate-gha-chart.yaml rename to .github/workflows/gha-validate-chart.yaml index 645b32e9..5b1b4567 100644 --- a/.github/workflows/validate-gha-chart.yaml +++ b/.github/workflows/gha-validate-chart.yaml @@ -1,4 +1,4 @@ -name: Validate Helm Chart (gha-runner-scale-set-controller and gha-runner-scale-set) +name: (gha) Validate Helm Charts on: pull_request: @@ -6,13 +6,13 @@ on: - master paths: - 'charts/**' - - '.github/workflows/validate-gha-chart.yaml' + - '.github/workflows/gha-validate-chart.yaml' - '!charts/actions-runner-controller/**' - '!**.md' push: paths: - 'charts/**' - - '.github/workflows/validate-gha-chart.yaml' + - '.github/workflows/gha-validate-chart.yaml' - '!charts/actions-runner-controller/**' - '!**.md' workflow_dispatch: diff --git a/.github/workflows/publish-canary.yaml b/.github/workflows/global-publish-canary.yaml similarity index 86% rename from .github/workflows/publish-canary.yaml rename to .github/workflows/global-publish-canary.yaml index 984cd523..27579084 100644 --- a/.github/workflows/publish-canary.yaml +++ b/.github/workflows/global-publish-canary.yaml @@ -1,4 +1,4 @@ -name: Publish Canary Image +name: Publish Canary Images # Revert to https://github.com/actions-runner-controller/releases#releases # for details on why we use this approach @@ -11,19 +11,19 @@ on: - '.github/actions/**' - '.github/ISSUE_TEMPLATE/**' - '.github/workflows/e2e-test-dispatch-workflow.yaml' - - '.github/workflows/e2e-test-linux-vm.yaml' - - '.github/workflows/publish-arc.yaml' - - '.github/workflows/publish-chart.yaml' - - '.github/workflows/publish-runner-scale-set.yaml' - - '.github/workflows/release-runners.yaml' - - '.github/workflows/run-codeql.yaml' - - '.github/workflows/run-first-interaction.yaml' - - '.github/workflows/run-stale.yaml' - - '.github/workflows/update-runners.yaml' + - '.github/workflows/gha-e2e-tests.yaml' + - '.github/workflows/arc-publish.yaml' + - '.github/workflows/arc-publish-chart.yaml' + - '.github/workflows/gha-publish-chart.yaml' + - '.github/workflows/arc-release-runners.yaml' + - '.github/workflows/global-run-codeql.yaml' + - '.github/workflows/global-run-first-interaction.yaml' + - '.github/workflows/global-run-stale.yaml' + - '.github/workflows/arc-update-runners-scheduled.yaml' - '.github/workflows/validate-arc.yaml' - - '.github/workflows/validate-chart.yaml' - - '.github/workflows/validate-gha-chart.yaml' - - '.github/workflows/validate-runners.yaml' + - '.github/workflows/arc-validate-chart.yaml' + - '.github/workflows/gha-validate-chart.yaml' + - '.github/workflows/arc-validate-runners.yaml' - '.github/dependabot.yml' - '.github/RELEASE_NOTE_TEMPLATE.md' - 'runner/**' @@ -126,4 +126,4 @@ jobs: ghcr.io/${{ steps.resolve_parameters.outputs.repository_owner }}/gha-runner-scale-set-controller:canary ghcr.io/${{ steps.resolve_parameters.outputs.repository_owner }}/gha-runner-scale-set-controller:canary-${{ steps.resolve_parameters.outputs.short_sha }} cache-from: type=gha - cache-to: type=gha,mode=max \ No newline at end of file + cache-to: type=gha,mode=max diff --git a/.github/workflows/run-codeql.yaml b/.github/workflows/global-run-codeql.yaml similarity index 100% rename from .github/workflows/run-codeql.yaml rename to .github/workflows/global-run-codeql.yaml diff --git a/.github/workflows/run-first-interaction.yaml b/.github/workflows/global-run-first-interaction.yaml similarity index 97% rename from .github/workflows/run-first-interaction.yaml rename to .github/workflows/global-run-first-interaction.yaml index 908deccb..ce1139a5 100644 --- a/.github/workflows/run-first-interaction.yaml +++ b/.github/workflows/global-run-first-interaction.yaml @@ -1,4 +1,4 @@ -name: first-interaction +name: First Interaction on: issues: diff --git a/.github/workflows/run-stale.yaml b/.github/workflows/global-run-stale.yaml similarity index 100% rename from .github/workflows/run-stale.yaml rename to .github/workflows/global-run-stale.yaml diff --git a/docs/adrs/2023-02-02-automate-runner-updates.md b/docs/adrs/2023-02-02-automate-runner-updates.md index c3bb5c4d..7e0f7f0c 100644 --- a/docs/adrs/2023-02-02-automate-runner-updates.md +++ b/docs/adrs/2023-02-02-automate-runner-updates.md @@ -10,7 +10,7 @@ When a new [runner](https://github.com/actions/runner) version is released, new images need to be built in [actions-runner-controller/releases](https://github.com/actions-runner-controller/releases). This is currently started by the -[release-runners](https://github.com/actions/actions-runner-controller/blob/master/.github/workflows/release-runners.yaml) +[release-runners](https://github.com/actions/actions-runner-controller/blob/master/.github/workflows/arc-release-runners.yaml) workflow, although this only starts when the set of file containing the runner version is updated (and this is currently done manually). @@ -19,7 +19,7 @@ version is updated (and this is currently done manually). We can have another workflow running on a cadence (hourly seems sensible) and checking for new runner releases, creating a PR updating `RUNNER_VERSION` in: -- `.github/workflows/release-runners.yaml` +- `.github/workflows/arc-release-runners.yaml` - `Makefile` - `runner/Makefile` - `test/e2e/e2e_test.go` diff --git a/docs/adrs/2023-03-17-workflow-improvements.md b/docs/adrs/2023-03-17-workflow-improvements.md index 38d611aa..f85bd9b9 100644 --- a/docs/adrs/2023-03-17-workflow-improvements.md +++ b/docs/adrs/2023-03-17-workflow-improvements.md @@ -26,7 +26,7 @@ At the moment we have three workflows that validate Go code: - [Validate ARC](https://github.com/actions/actions-runner-controller/blob/01e9dd3/.github/workflows/validate-arc.yaml): this is a bit of a catch-all workflow, other than Go tests this also validates Kubernetes manifests, runs `go generate`, `go fmt` and `go vet` -- [Run CodeQL](https://github.com/actions/actions-runner-controller/blob/a095f0b66aad5fbc8aa8d7032f3299233e4c84d2/.github/workflows/run-codeql.yaml) +- [Run CodeQL](https://github.com/actions/actions-runner-controller/blob/master/.github/workflows/global-run-codeql.yaml) ### Proposal