diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..dea9eb26 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +[*] +insert_final_newline = true + +# Override for Makefile +[{Makefile,makefile,GNUmakefile}] +indent_style = tab +indent_size = 4 + +[Makefile.*] +indent_style = tab +indent_size = 4 + +[*.md] +indent_style = space +indent_size = 2 + +[{*.yaml,*.yml}] +indent_style = space +indent_size = 2 + +[*.sh] +indent_style = tab +indent_size = 2 diff --git a/migrate/README.md b/migrate/README.md index b1cad924..b11867c0 100644 --- a/migrate/README.md +++ b/migrate/README.md @@ -4,7 +4,7 @@ Create a migration script in [`migrations//script.sh`](migrations/) and us ```shell # Export this environment variable to actually create and merge PRs -XARGS_DRY_RUN=false +export XARGS_DRY_RUN=false # Pass the migration and the list of repos in the migration to process. ./git-xargs.sh 20240304 repos.txt @@ -37,6 +37,7 @@ Including a `default` folder, which is used when no files are found for a given 1. Use `yq` for manipulating YAML. It will preserve comments but not whitespace. It will also replace Unicode characters with their escape sequence. Use `yamlfix` to restore the Unicode character. 2. Use `yamlfix` to format YAML and normalize whitespace. +3. Create a list of repos using the `gh repo list` command
Past Limitations Using `git-xargs` CLI @@ -49,4 +50,4 @@ We encountered significant obstacles using `git-xargs`. Here they are for poster - `git-xargs` will not update PR title/description, so it's advisable to just use `gh` CLI instead - `git-xargs` cannot auto-merge, so use `gh-cli` in script to commit, push, open PR, then merge - Using `gh-cli` to bypass the `git-xargs` deficiencies, means rate limiting isn't respected by `git-xargs` -
\ No newline at end of file + diff --git a/migrate/lib/common.sh b/migrate/lib/common.sh index b4b08004..6daf66e9 100644 --- a/migrate/lib/common.sh +++ b/migrate/lib/common.sh @@ -49,8 +49,13 @@ function install() { local destination=${2:-$source} local source_file=$(template_file $source) if [ -f "${source_file}" ]; then - info "Installing $destination from $source_file" + info "Installing file $destination from $source_file" cp -a $source_file $destination + git add $destination + elif [ -d "${source_file}" ]; then + info "Installing directory $destination from $source_file" + mkdir -p $destination + cp -a $source_file/ $destination/ git add $destination else error "Template not found: $source" @@ -66,6 +71,10 @@ function template_file() { echo ${MIGRATE_PATH}/templates/${REPO_TYPE}/$1 elif [ -f ${MIGRATE_PATH}/templates/default/$1 ]; then echo ${MIGRATE_PATH}/templates/default/$1 + elif [ -d ${MIGRATE_PATH}/templates/${REPO_TYPE}/$1 ]; then + echo ${MIGRATE_PATH}/templates/${REPO_TYPE}/$1 + elif [ -d ${MIGRATE_PATH}/templates/default/$1 ]; then + echo ${MIGRATE_PATH}/templates/default/$1 else error "Template not found: $1" fi diff --git a/migrate/migrations/20240410/README.md b/migrate/migrations/20240410/README.md new file mode 100644 index 00000000..254fdd37 --- /dev/null +++ b/migrate/migrations/20240410/README.md @@ -0,0 +1,8 @@ +## what + +- Install latest GitHub Action Workflows + +## why + +- Use shared workflows from `cldouposse/.github` repository +- Simplify management of workflows from centralized hub of configuration diff --git a/migrate/migrations/20240410/repos-00 b/migrate/migrations/20240410/repos-00 new file mode 100644 index 00000000..eb7eda19 --- /dev/null +++ b/migrate/migrations/20240410/repos-00 @@ -0,0 +1,16 @@ +cloudposse/terraform-aws-iam-user +cloudposse/terraform-example-module +cloudposse/terraform-aws-ssm-tls-ssh-key-pair +cloudposse/terraform-aws-eks-cluster +cloudposse/terraform-aws-mq-broker +cloudposse/terraform-aws-ecs-web-app +cloudposse/terraform-aws-eks-iam-role +cloudposse/terraform-aws-iam-role +cloudposse/terraform-aws-sns-topic +cloudposse/terraform-aws-datadog-lambda-forwarder +cloudposse/terraform-aws-ecs-codepipeline +cloudposse/terraform-aws-ssm-patch-manager +cloudposse/terraform-aws-components +cloudposse/terraform-aws-eks-fargate-profile +cloudposse/terraform-aws-eks-node-group +cloudposse/terraform-aws-dms diff --git a/migrate/migrations/20240410/repos-01 b/migrate/migrations/20240410/repos-01 new file mode 100644 index 00000000..3ee91384 --- /dev/null +++ b/migrate/migrations/20240410/repos-01 @@ -0,0 +1,16 @@ +cloudposse/terraform-aws-mwaa +cloudposse/terraform-aws-waf +cloudposse/terraform-aws-redshift-cluster +cloudposse/terraform-aws-vpc-peering-multi-account +cloudposse/terraform-aws-ecs-alb-service-task +cloudposse/terraform-aws-tfstate-backend +cloudposse/terraform-aws-iam-system-user +cloudposse/terraform-aws-budgets +cloudposse/terraform-aws-lakeformation +cloudposse/terraform-aws-kinesis-stream +cloudposse/terraform-aws-ecs-cluster +cloudposse/terraform-aws-kv-store +cloudposse/terraform-artifactory-kv-store +cloudposse/terraform-aws-refarch-utils +cloudposse/terraform-aws-network-firewall +cloudposse/terraform-aws-firewall-manager diff --git a/migrate/migrations/20240410/repos-02 b/migrate/migrations/20240410/repos-02 new file mode 100644 index 00000000..cc2c9c0c --- /dev/null +++ b/migrate/migrations/20240410/repos-02 @@ -0,0 +1,16 @@ +cloudposse/terraform-yaml-stack-config +cloudposse/terraform-aws-security-group +cloudposse/terraform-aws-amplify-app +cloudposse/terraform-module-test +cloudposse/terraform-aws-route53-resolver-dns-firewall +cloudposse/terraform-aws-step-functions +cloudposse/terraform-aws-github-action-token-rotator +cloudposse/terraform-aws-glue +cloudposse/terraform-aws-athena +cloudposse/terraform-aws-lambda-function +cloudposse/terraform-aws-ecr-public +cloudposse/terraform-aws-ec2-client-vpn +cloudposse/terraform-aws-ssm-tls-self-signed-cert +cloudposse/terraform-aws-service-quotas +cloudposse/terraform-aws-rds-db-proxy +cloudposse/terraform-aws-api-gateway diff --git a/migrate/migrations/20240410/repos-03 b/migrate/migrations/20240410/repos-03 new file mode 100644 index 00000000..105858ce --- /dev/null +++ b/migrate/migrations/20240410/repos-03 @@ -0,0 +1,16 @@ +cloudposse/terraform-cloudflare-waf-rulesets +cloudposse/terraform-aws-code-deploy +cloudposse/terraform-aws-transfer-sftp +cloudposse/terraform-aws-iam-policy +cloudposse/terraform-aws-helm-release +cloudposse/terraform-aws-health-events +cloudposse/terraform-aws-global-accelerator +cloudposse/terraform-aws-macie +cloudposse/terraform-cloudflare-zone +cloudposse/terraform-aws-config-storage +cloudposse/terraform-aws-sso +cloudposse/terraform-aws-rds-replica +cloudposse/terraform-aws-emr-cluster +cloudposse/terraform-spacelift-cloud-infrastructure-automation +cloudposse/terraform-aws-security-hub +cloudposse/terraform-aws-config diff --git a/migrate/migrations/20240410/repos-04 b/migrate/migrations/20240410/repos-04 new file mode 100644 index 00000000..64055166 --- /dev/null +++ b/migrate/migrations/20240410/repos-04 @@ -0,0 +1,16 @@ +cloudposse/terraform-aws-utils +cloudposse/terraform-aws-eks-spotinst-ocean-nodepool +cloudposse/terraform-aws-service-control-policies +cloudposse/terraform-kubernetes-tfc-cloud-agent +cloudposse/terraform-aws-guardduty +cloudposse/terraform-aws-inspector +cloudposse/terraform-aws-msk-apache-kafka-cluster +cloudposse/terraform-yaml-config +cloudposse/terraform-opsgenie-incident-management +cloudposse/terraform-aws-cloudwatch-events +cloudposse/terraform-aws-nlb +cloudposse/terraform-aws-transit-gateway +cloudposse/terraform-aws-sns-cloudwatch-sns-alarms +cloudposse/terraform-aws-vpc-flow-logs-s3-bucket +cloudposse/terraform-aws-ses +cloudposse/terraform-aws-backup diff --git a/migrate/migrations/20240410/repos-05 b/migrate/migrations/20240410/repos-05 new file mode 100644 index 00000000..a4a4697c --- /dev/null +++ b/migrate/migrations/20240410/repos-05 @@ -0,0 +1,16 @@ +cloudposse/terraform-aws-spotinst-mrscaler +cloudposse/terraform-aws-ssm-parameter-chamber-reader +cloudposse/terraform-aws-cloudformation-stack +cloudposse/terraform-aws-cloudformation-stack-set +cloudposse/terraform-aws-s3-bucket +cloudposse/terraform-aws-iam-chamber-s3-role +cloudposse/terraform-aws-documentdb-cluster +cloudposse/terraform-aws-vpn-connection +cloudposse/terraform-external-module-artifact +cloudposse/terraform-aws-lambda-elasticsearch-cleanup +cloudposse/terraform-aws-rds-cluster-instance-group +cloudposse/terraform-github-repository-webhooks +cloudposse/terraform-aws-iam-account-settings +cloudposse/terraform-null-smtp-mail +cloudposse/terraform-aws-eks-workers +cloudposse/terraform-aws-elasticsearch diff --git a/migrate/migrations/20240410/repos-06 b/migrate/migrations/20240410/repos-06 new file mode 100644 index 00000000..c707058c --- /dev/null +++ b/migrate/migrations/20240410/repos-06 @@ -0,0 +1,16 @@ +cloudposse/terraform-aws-ecs-launch-template +cloudposse/terraform-aws-ec2-autoscale-group +cloudposse/terraform-aws-ses-lambda-forwarder +cloudposse/terraform-aws-sns-lambda-notify-slack +cloudposse/terraform-aws-ecs-cloudwatch-autoscaling +cloudposse/terraform-aws-alb-target-group-cloudwatch-sns-alarms +cloudposse/terraform-aws-ecs-cloudwatch-sns-alarms +cloudposse/terraform-aws-cloudtrail-cloudwatch-alarms +cloudposse/terraform-aws-ssm-parameter-store-policy-documents +cloudposse/terraform-aws-ecs-spot-fleet +cloudposse/terraform-aws-ssm-iam-role +cloudposse/terraform-aws-lambda-cloudwatch-sns-alarms +cloudposse/terraform-aws-sqs-cloudwatch-sns-alarms +cloudposse/terraform-aws-elasticache-cloudwatch-sns-alarms +cloudposse/terraform-aws-ecs-events +cloudposse/terraform-aws-alb-ingress diff --git a/migrate/migrations/20240410/repos-07 b/migrate/migrations/20240410/repos-07 new file mode 100644 index 00000000..1b35fefd --- /dev/null +++ b/migrate/migrations/20240410/repos-07 @@ -0,0 +1,16 @@ +cloudposse/terraform-aws-lb-s3-bucket +cloudposse/terraform-aws-alb +cloudposse/terraform-aws-iam-s3-user +cloudposse/terraform-aws-ecs-container-definition +cloudposse/terraform-aws-efs-cloudwatch-sns-alarms +cloudposse/terraform-aws-ec2-instance-group +cloudposse/terraform-aws-rds-cloudwatch-sns-alarms +cloudposse/terraform-aws-ssm-parameter-store +cloudposse/terraform-terraform-label +cloudposse/terraform-aws-cloudtrail-s3-bucket +cloudposse/terraform-tls-ssh-key-pair +cloudposse/terraform-aws-kms-key +cloudposse/terraform-aws-dynamodb-autoscaler +cloudposse/terraform-aws-organization-access-group +cloudposse/terraform-aws-organization-access-role +cloudposse/terraform-aws-cloudwatch-flow-logs diff --git a/migrate/migrations/20240410/repos-08 b/migrate/migrations/20240410/repos-08 new file mode 100644 index 00000000..d8b09350 --- /dev/null +++ b/migrate/migrations/20240410/repos-08 @@ -0,0 +1,16 @@ +cloudposse/terraform-aws-named-subnets +cloudposse/terraform-aws-dynamodb +cloudposse/terraform-aws-cloudwatch-logs +cloudposse/terraform-aws-multi-az-subnets +cloudposse/terraform-aws-vpc-peering +cloudposse/terraform-aws-datadog-integration +cloudposse/terraform-null-label +cloudposse/terraform-aws-efs +cloudposse/terraform-aws-iam-assumed-roles +cloudposse/terraform-aws-elasticache-redis +cloudposse/terraform-aws-elasticache-memcached +cloudposse/terraform-aws-elastic-beanstalk-environment +cloudposse/terraform-aws-elastic-beanstalk-application +cloudposse/terraform-aws-ec2-instance +cloudposse/terraform-aws-ec2-bastion-server +cloudposse/terraform-aws-ec2-ami-snapshot diff --git a/migrate/migrations/20240410/repos-09 b/migrate/migrations/20240410/repos-09 new file mode 100644 index 00000000..b6c2f5c3 --- /dev/null +++ b/migrate/migrations/20240410/repos-09 @@ -0,0 +1,16 @@ +cloudposse/terraform-aws-ec2-admin-server +cloudposse/terraform-aws-dynamic-subnets +cloudposse/terraform-aws-codebuild +cloudposse/terraform-null-ansible +cloudposse/terraform-aws-vpc +cloudposse/terraform-aws-s3-website +cloudposse/terraform-aws-s3-log-storage +cloudposse/terraform-aws-route53-cluster-zone +cloudposse/terraform-aws-route53-cluster-hostname +cloudposse/terraform-aws-route53-alias +cloudposse/terraform-aws-rds-cluster +cloudposse/terraform-aws-rds +cloudposse/terraform-aws-key-pair +cloudposse/terraform-aws-efs-backup +cloudposse/terraform-aws-ecr +cloudposse/terraform-aws-cloudtrail diff --git a/migrate/migrations/20240410/repos-10 b/migrate/migrations/20240410/repos-10 new file mode 100644 index 00000000..7372b06a --- /dev/null +++ b/migrate/migrations/20240410/repos-10 @@ -0,0 +1,7 @@ +cloudposse/terraform-aws-cloudfront-s3-cdn +cloudposse/terraform-aws-cloudfront-cdn +cloudposse/terraform-aws-cicd +cloudposse/terraform-aws-acm-request-certificate +cloudposse/terraform-aws-ec2-ami-backup +cloudposse/terraform-datadog-platform +cloudposse/terraform-aws-batch diff --git a/migrate/migrations/20240410/repos-11 b/migrate/migrations/20240410/repos-11 new file mode 100644 index 00000000..311f582f --- /dev/null +++ b/migrate/migrations/20240410/repos-11 @@ -0,0 +1 @@ +cloudposse/tap-terraform-registry diff --git a/migrate/migrations/20240410/repos.sh b/migrate/migrations/20240410/repos.sh new file mode 100755 index 00000000..1feaa6d0 --- /dev/null +++ b/migrate/migrations/20240410/repos.sh @@ -0,0 +1,5 @@ +#!/bin/bash +gh repo list cloudposse --limit 500 --json name,owner \ + --jq '.[] | select(.name | test("^terraform")) | select(.name | test("^terraform-provider") | not) | .owner.login + "/" + .name' > repos.txt + +split -d -l 16 repos.txt repos- diff --git a/migrate/migrations/20240410/repos.txt b/migrate/migrations/20240410/repos.txt new file mode 100644 index 00000000..5f01a328 --- /dev/null +++ b/migrate/migrations/20240410/repos.txt @@ -0,0 +1,168 @@ +cloudposse/terraform-aws-iam-user +cloudposse/terraform-example-module +cloudposse/terraform-aws-ssm-tls-ssh-key-pair +cloudposse/terraform-aws-eks-cluster +cloudposse/terraform-aws-mq-broker +cloudposse/terraform-aws-ecs-web-app +cloudposse/terraform-aws-eks-iam-role +cloudposse/terraform-aws-iam-role +cloudposse/terraform-aws-sns-topic +cloudposse/terraform-aws-datadog-lambda-forwarder +cloudposse/terraform-aws-ecs-codepipeline +cloudposse/terraform-aws-ssm-patch-manager +cloudposse/terraform-aws-components +cloudposse/terraform-aws-eks-fargate-profile +cloudposse/terraform-aws-eks-node-group +cloudposse/terraform-aws-dms +cloudposse/terraform-aws-mwaa +cloudposse/terraform-aws-waf +cloudposse/terraform-aws-redshift-cluster +cloudposse/terraform-aws-vpc-peering-multi-account +cloudposse/terraform-aws-ecs-alb-service-task +cloudposse/terraform-aws-tfstate-backend +cloudposse/terraform-aws-iam-system-user +cloudposse/terraform-aws-budgets +cloudposse/terraform-aws-lakeformation +cloudposse/terraform-aws-kinesis-stream +cloudposse/terraform-aws-ecs-cluster +cloudposse/terraform-aws-kv-store +cloudposse/terraform-artifactory-kv-store +cloudposse/terraform-aws-refarch-utils +cloudposse/terraform-aws-network-firewall +cloudposse/terraform-aws-firewall-manager +cloudposse/terraform-yaml-stack-config +cloudposse/terraform-aws-security-group +cloudposse/terraform-aws-amplify-app +cloudposse/terraform-module-test +cloudposse/terraform-aws-route53-resolver-dns-firewall +cloudposse/terraform-aws-step-functions +cloudposse/terraform-aws-github-action-token-rotator +cloudposse/terraform-aws-glue +cloudposse/terraform-aws-athena +cloudposse/terraform-aws-lambda-function +cloudposse/terraform-aws-ecr-public +cloudposse/terraform-aws-ec2-client-vpn +cloudposse/terraform-aws-ssm-tls-self-signed-cert +cloudposse/terraform-aws-service-quotas +cloudposse/terraform-aws-rds-db-proxy +cloudposse/terraform-aws-api-gateway +cloudposse/terraform-cloudflare-waf-rulesets +cloudposse/terraform-aws-code-deploy +cloudposse/terraform-aws-transfer-sftp +cloudposse/terraform-aws-iam-policy +cloudposse/terraform-aws-helm-release +cloudposse/terraform-aws-health-events +cloudposse/terraform-aws-global-accelerator +cloudposse/terraform-aws-macie +cloudposse/terraform-cloudflare-zone +cloudposse/terraform-aws-config-storage +cloudposse/terraform-aws-sso +cloudposse/terraform-aws-rds-replica +cloudposse/terraform-aws-emr-cluster +cloudposse/terraform-spacelift-cloud-infrastructure-automation +cloudposse/terraform-aws-security-hub +cloudposse/terraform-aws-config +cloudposse/terraform-aws-utils +cloudposse/terraform-aws-eks-spotinst-ocean-nodepool +cloudposse/terraform-aws-service-control-policies +cloudposse/terraform-kubernetes-tfc-cloud-agent +cloudposse/terraform-aws-guardduty +cloudposse/terraform-aws-inspector +cloudposse/terraform-aws-msk-apache-kafka-cluster +cloudposse/terraform-yaml-config +cloudposse/terraform-opsgenie-incident-management +cloudposse/terraform-aws-cloudwatch-events +cloudposse/terraform-aws-nlb +cloudposse/terraform-aws-transit-gateway +cloudposse/terraform-aws-sns-cloudwatch-sns-alarms +cloudposse/terraform-aws-vpc-flow-logs-s3-bucket +cloudposse/terraform-aws-ses +cloudposse/terraform-aws-backup +cloudposse/terraform-aws-spotinst-mrscaler +cloudposse/terraform-aws-ssm-parameter-chamber-reader +cloudposse/terraform-aws-cloudformation-stack +cloudposse/terraform-aws-cloudformation-stack-set +cloudposse/terraform-aws-s3-bucket +cloudposse/terraform-aws-iam-chamber-s3-role +cloudposse/terraform-aws-documentdb-cluster +cloudposse/terraform-aws-vpn-connection +cloudposse/terraform-external-module-artifact +cloudposse/terraform-aws-lambda-elasticsearch-cleanup +cloudposse/terraform-aws-rds-cluster-instance-group +cloudposse/terraform-github-repository-webhooks +cloudposse/terraform-aws-iam-account-settings +cloudposse/terraform-null-smtp-mail +cloudposse/terraform-aws-eks-workers +cloudposse/terraform-aws-elasticsearch +cloudposse/terraform-aws-ecs-launch-template +cloudposse/terraform-aws-ec2-autoscale-group +cloudposse/terraform-aws-ses-lambda-forwarder +cloudposse/terraform-aws-sns-lambda-notify-slack +cloudposse/terraform-aws-ecs-cloudwatch-autoscaling +cloudposse/terraform-aws-alb-target-group-cloudwatch-sns-alarms +cloudposse/terraform-aws-ecs-cloudwatch-sns-alarms +cloudposse/terraform-aws-cloudtrail-cloudwatch-alarms +cloudposse/terraform-aws-ssm-parameter-store-policy-documents +cloudposse/terraform-aws-ecs-spot-fleet +cloudposse/terraform-aws-ssm-iam-role +cloudposse/terraform-aws-lambda-cloudwatch-sns-alarms +cloudposse/terraform-aws-sqs-cloudwatch-sns-alarms +cloudposse/terraform-aws-elasticache-cloudwatch-sns-alarms +cloudposse/terraform-aws-ecs-events +cloudposse/terraform-aws-alb-ingress +cloudposse/terraform-aws-lb-s3-bucket +cloudposse/terraform-aws-alb +cloudposse/terraform-aws-iam-s3-user +cloudposse/terraform-aws-ecs-container-definition +cloudposse/terraform-aws-efs-cloudwatch-sns-alarms +cloudposse/terraform-aws-ec2-instance-group +cloudposse/terraform-aws-rds-cloudwatch-sns-alarms +cloudposse/terraform-aws-ssm-parameter-store +cloudposse/terraform-terraform-label +cloudposse/terraform-aws-cloudtrail-s3-bucket +cloudposse/terraform-tls-ssh-key-pair +cloudposse/terraform-aws-kms-key +cloudposse/terraform-aws-dynamodb-autoscaler +cloudposse/terraform-aws-organization-access-group +cloudposse/terraform-aws-organization-access-role +cloudposse/terraform-aws-cloudwatch-flow-logs +cloudposse/terraform-aws-named-subnets +cloudposse/terraform-aws-dynamodb +cloudposse/terraform-aws-cloudwatch-logs +cloudposse/terraform-aws-multi-az-subnets +cloudposse/terraform-aws-vpc-peering +cloudposse/terraform-aws-datadog-integration +cloudposse/terraform-null-label +cloudposse/terraform-aws-efs +cloudposse/terraform-aws-iam-assumed-roles +cloudposse/terraform-aws-elasticache-redis +cloudposse/terraform-aws-elasticache-memcached +cloudposse/terraform-aws-elastic-beanstalk-environment +cloudposse/terraform-aws-elastic-beanstalk-application +cloudposse/terraform-aws-ec2-instance +cloudposse/terraform-aws-ec2-bastion-server +cloudposse/terraform-aws-ec2-ami-snapshot +cloudposse/terraform-aws-ec2-admin-server +cloudposse/terraform-aws-dynamic-subnets +cloudposse/terraform-aws-codebuild +cloudposse/terraform-null-ansible +cloudposse/terraform-aws-vpc +cloudposse/terraform-aws-s3-website +cloudposse/terraform-aws-s3-log-storage +cloudposse/terraform-aws-route53-cluster-zone +cloudposse/terraform-aws-route53-cluster-hostname +cloudposse/terraform-aws-route53-alias +cloudposse/terraform-aws-rds-cluster +cloudposse/terraform-aws-rds +cloudposse/terraform-aws-key-pair +cloudposse/terraform-aws-efs-backup +cloudposse/terraform-aws-ecr +cloudposse/terraform-aws-cloudtrail +cloudposse/terraform-aws-cloudfront-s3-cdn +cloudposse/terraform-aws-cloudfront-cdn +cloudposse/terraform-aws-cicd +cloudposse/terraform-aws-acm-request-certificate +cloudposse/terraform-aws-ec2-ami-backup +cloudposse/terraform-datadog-platform +cloudposse/terraform-aws-batch +cloudposse/terraform-broken-repo diff --git a/migrate/migrations/20240410/script.sh b/migrate/migrations/20240410/script.sh new file mode 100644 index 00000000..8008c7df --- /dev/null +++ b/migrate/migrations/20240410/script.sh @@ -0,0 +1,6 @@ +title "Use GitHub Action Workflows from \`cloudposse/.github\` Repo" + +install .github/workflows + +# Merge the PR +auto_merge diff --git a/migrate/run.sh b/migrate/run.sh index a64359c4..7c437045 100755 --- a/migrate/run.sh +++ b/migrate/run.sh @@ -117,7 +117,10 @@ if [ "${XARGS_DRY_RUN}" == "false" ]; then info "Auto-merging PR" gh pr merge --admin --squash --delete-branch fi +else + info "https://github.com/${XARGS_REPO_OWNER}/${XARGS_REPO_NAME}/compare/${current_branch}?expand=1" + info "Dry run complete. No PR created." fi # Clean up again, so that `git-xargs` doesn't commit the cache files from `gh` cli in the `tmp/` folder -git clean -fxd \ No newline at end of file +git clean -fxd diff --git a/migrate/templates/terraform-module/.github/workflows/release-branch.yml b/migrate/templates/terraform-module/.github/workflows/release-branch.yml new file mode 100644 index 00000000..3593cea5 --- /dev/null +++ b/migrate/templates/terraform-module/.github/workflows/release-branch.yml @@ -0,0 +1,19 @@ +--- +name: release-branch +on: + push: + branches: + - main + - release/v* + paths-ignore: + - '.github/**' + - 'docs/**' + - 'examples/**' + - 'test/**' + +permissions: {} + +jobs: + terraform-module: + uses: cloudposse/github-actions-workflows-terraform-module/.github/workflows/release-branch.yml@main + secrets: inherit diff --git a/migrate/templates/terraform-module/.github/workflows/release-published.yml b/migrate/templates/terraform-module/.github/workflows/release-published.yml new file mode 100644 index 00000000..1b0aaca7 --- /dev/null +++ b/migrate/templates/terraform-module/.github/workflows/release-published.yml @@ -0,0 +1,13 @@ +--- +name: release-published +on: + release: + types: + - published + +permissions: {} + +jobs: + terraform-module: + uses: cloudposse/github-actions-workflows-terraform-module/.github/workflows/release-published.yml@main + secrets: inherit