From 71054ee13cab380ecc5ba00c1cd4cc2ea25852f3 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Mon, 16 Sep 2024 18:49:41 +0300 Subject: [PATCH] Update settings for github actions (#116) * Update settings * Refresh settings * Update script.sh * Refresh settings * Added migration for gha * Generate repos list --- migrate/migrations/20240716/README.md | 10 ++++++ migrate/migrations/20240716/repos-00 | 16 +++++++++ migrate/migrations/20240716/repos-01 | 16 +++++++++ migrate/migrations/20240716/repos-02 | 16 +++++++++ migrate/migrations/20240716/repos-03 | 3 ++ migrate/migrations/20240716/repos.sh | 5 +++ migrate/migrations/20240716/repos.txt | 51 +++++++++++++++++++++++++++ migrate/migrations/20240716/script.sh | 7 ++++ 8 files changed, 124 insertions(+) create mode 100644 migrate/migrations/20240716/README.md create mode 100644 migrate/migrations/20240716/repos-00 create mode 100644 migrate/migrations/20240716/repos-01 create mode 100644 migrate/migrations/20240716/repos-02 create mode 100644 migrate/migrations/20240716/repos-03 create mode 100755 migrate/migrations/20240716/repos.sh create mode 100644 migrate/migrations/20240716/repos.txt create mode 100644 migrate/migrations/20240716/script.sh diff --git a/migrate/migrations/20240716/README.md b/migrate/migrations/20240716/README.md new file mode 100644 index 00000000..213ba3aa --- /dev/null +++ b/migrate/migrations/20240716/README.md @@ -0,0 +1,10 @@ +## what +- Update `.github/settings.yml` +- Drop `.github/auto-release.yml` files + +## why +- Re-apply `.github/settings.yml` from org level +- Use organization level auto-release settings + +## references +- DEV-1242 Add protected tags with Repository Rulesets on GitHub diff --git a/migrate/migrations/20240716/repos-00 b/migrate/migrations/20240716/repos-00 new file mode 100644 index 00000000..08deaedd --- /dev/null +++ b/migrate/migrations/20240716/repos-00 @@ -0,0 +1,16 @@ +cloudposse/github-action-atmos-affected-stacks +cloudposse/github-action-atmos-terraform-apply +cloudposse/github-action-atmos-get-setting +cloudposse/github-action-release-branch-manager +cloudposse/github-action-major-release-tagger +cloudposse/github-action-setup-atmos +cloudposse/github-action-deploy-argocd +cloudposse/github-action-atmos-terraform-drift-detection +cloudposse/github-action-preview-environment-controller +cloudposse/github-action-atmos-affected-trigger-spacelift +cloudposse/github-action-atmos-component-updater +cloudposse/github-action-matrix-outputs-write +cloudposse/github-action-atmos-terraform-plan +cloudposse/github-action-deploy-helmfile +cloudposse/github-action-aws-region-reduction-map +cloudposse/github-action-secret-outputs diff --git a/migrate/migrations/20240716/repos-01 b/migrate/migrations/20240716/repos-01 new file mode 100644 index 00000000..7989cf3c --- /dev/null +++ b/migrate/migrations/20240716/repos-01 @@ -0,0 +1,16 @@ +cloudposse/github-action-yaml-config-query +cloudposse/github-action-config-levels +cloudposse/github-action-docker-build-push +cloudposse/github-action-terraform-plan-storage +cloudposse/github-action-wait-commit-status +cloudposse/github-action-pull-request-labeling +cloudposse/github-action-datadog-notify +cloudposse/github-action-mega-linter +cloudposse/github-action-telemetry +cloudposse/github-action-deploy-spacelift +cloudposse/github-action-monorepo-random-controller +cloudposse/github-action-preview-labels-cleanup +cloudposse/github-action-seek-deployment +cloudposse/github-action-docker-compose-test-run +cloudposse/github-action-spacelift-stack-deploy +cloudposse/github-action-terratest diff --git a/migrate/migrations/20240716/repos-02 b/migrate/migrations/20240716/repos-02 new file mode 100644 index 00000000..dcc98f1c --- /dev/null +++ b/migrate/migrations/20240716/repos-02 @@ -0,0 +1,16 @@ +cloudposse/github-action-interface-environment +cloudposse/github-action-deploy-ecspresso +cloudposse/github-action-terraform-auto-context +cloudposse/github-action-validate-codeowners +cloudposse/github-action-atmos-terraform-drift-remediation +cloudposse/github-action-release-label-validator +cloudposse/github-action-matrix-outputs-read +cloudposse/github-action-atmos-terraform-select-components +cloudposse/github-action-matrix-extended +cloudposse/github-action-sync-docker-repos +cloudposse/github-action-auto-format +cloudposse/github-action-jq +cloudposse/github-action-run-ecspresso +cloudposse/github-action-kubernetes-environment +cloudposse/github-action-auto-release +cloudposse/github-action-docker-promote diff --git a/migrate/migrations/20240716/repos-03 b/migrate/migrations/20240716/repos-03 new file mode 100644 index 00000000..92484965 --- /dev/null +++ b/migrate/migrations/20240716/repos-03 @@ -0,0 +1,3 @@ +cloudposse/github-action-docker-image-exists +cloudposse/github-action-pre-commit +cloudposse/github-action-atmos-dependencies-test diff --git a/migrate/migrations/20240716/repos.sh b/migrate/migrations/20240716/repos.sh new file mode 100755 index 00000000..1d66be9d --- /dev/null +++ b/migrate/migrations/20240716/repos.sh @@ -0,0 +1,5 @@ +#!/bin/bash +gh repo list cloudposse --limit 500 --json name,owner \ + --jq '.[] | select(.name | test("^github-action-")) | .owner.login + "/" + .name' > repos.txt + +split -d -l 16 repos.txt repos- diff --git a/migrate/migrations/20240716/repos.txt b/migrate/migrations/20240716/repos.txt new file mode 100644 index 00000000..079cc4ad --- /dev/null +++ b/migrate/migrations/20240716/repos.txt @@ -0,0 +1,51 @@ +cloudposse/github-action-atmos-affected-stacks +cloudposse/github-action-atmos-terraform-apply +cloudposse/github-action-atmos-get-setting +cloudposse/github-action-release-branch-manager +cloudposse/github-action-major-release-tagger +cloudposse/github-action-setup-atmos +cloudposse/github-action-deploy-argocd +cloudposse/github-action-atmos-terraform-drift-detection +cloudposse/github-action-preview-environment-controller +cloudposse/github-action-atmos-affected-trigger-spacelift +cloudposse/github-action-atmos-component-updater +cloudposse/github-action-matrix-outputs-write +cloudposse/github-action-atmos-terraform-plan +cloudposse/github-action-deploy-helmfile +cloudposse/github-action-aws-region-reduction-map +cloudposse/github-action-secret-outputs +cloudposse/github-action-yaml-config-query +cloudposse/github-action-config-levels +cloudposse/github-action-docker-build-push +cloudposse/github-action-terraform-plan-storage +cloudposse/github-action-wait-commit-status +cloudposse/github-action-pull-request-labeling +cloudposse/github-action-datadog-notify +cloudposse/github-action-mega-linter +cloudposse/github-action-telemetry +cloudposse/github-action-deploy-spacelift +cloudposse/github-action-monorepo-random-controller +cloudposse/github-action-preview-labels-cleanup +cloudposse/github-action-seek-deployment +cloudposse/github-action-docker-compose-test-run +cloudposse/github-action-spacelift-stack-deploy +cloudposse/github-action-terratest +cloudposse/github-action-interface-environment +cloudposse/github-action-deploy-ecspresso +cloudposse/github-action-terraform-auto-context +cloudposse/github-action-validate-codeowners +cloudposse/github-action-atmos-terraform-drift-remediation +cloudposse/github-action-release-label-validator +cloudposse/github-action-matrix-outputs-read +cloudposse/github-action-atmos-terraform-select-components +cloudposse/github-action-matrix-extended +cloudposse/github-action-sync-docker-repos +cloudposse/github-action-auto-format +cloudposse/github-action-jq +cloudposse/github-action-run-ecspresso +cloudposse/github-action-kubernetes-environment +cloudposse/github-action-auto-release +cloudposse/github-action-docker-promote +cloudposse/github-action-docker-image-exists +cloudposse/github-action-pre-commit +cloudposse/github-action-atmos-dependencies-test diff --git a/migrate/migrations/20240716/script.sh b/migrate/migrations/20240716/script.sh new file mode 100644 index 00000000..b2beb5dc --- /dev/null +++ b/migrate/migrations/20240716/script.sh @@ -0,0 +1,7 @@ +title "Update .github/settings.yml" + +refresh_github_settings +remove .github/auto-release.yml + +# Merge the PR +auto_merge