From c7478495a28b78ad9f4ed40c342391f6987fc403 Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Fri, 10 Mar 2023 11:47:42 -0100 Subject: [PATCH] Admin: Use different GH action to create PRs (#6047) --- .../data-update_ec2-instance-offerings.yml | 17 ++++++++--------- .../data-update_ec2-instance-types.yml | 17 ++++++++--------- .../data-update_ssm-default-amis.yml | 19 +++++++++---------- .../data-update_ssm-default-parameters.yml | 19 +++++++++---------- 4 files changed, 34 insertions(+), 38 deletions(-) diff --git a/.github/workflows/data-update_ec2-instance-offerings.yml b/.github/workflows/data-update_ec2-instance-offerings.yml index 39b749aba..984992836 100644 --- a/.github/workflows/data-update_ec2-instance-offerings.yml +++ b/.github/workflows/data-update_ec2-instance-offerings.yml @@ -38,13 +38,12 @@ jobs: role-to-assume: arn:aws:iam::486285699788:role/GithubActionsRole - name: Pull EC2 instance types from AWS - uses: technote-space/create-pr-action@v2 + run: | + pip install boto3 + scripts/ec2_get_instance_type_offerings.py + - name: Create PR + uses: peter-evans/create-pull-request@v4 with: - EXECUTE_COMMANDS: | - pip install boto3 - scripts/ec2_get_instance_type_offerings.py - COMMIT_MESSAGE: 'chore: update EC2 Instance Offerings' - COMMIT_NAME: 'Moto Admin' - COMMIT_EMAIL: 'admin@getmoto.org' - PR_BRANCH_NAME: 'chore-update-ec2-offerings-${{ github.run_number }}' - PR_TITLE: 'chore: update EC2 Instance Offerings' + branch: 'chore-update-ec2-offerings-${{ github.run_number }}' + title: 'chore: update EC2 Instance Offerings' + commit-message: 'chore: update EC2 Instance Offerings' diff --git a/.github/workflows/data-update_ec2-instance-types.yml b/.github/workflows/data-update_ec2-instance-types.yml index 2c1750649..a0762572e 100644 --- a/.github/workflows/data-update_ec2-instance-types.yml +++ b/.github/workflows/data-update_ec2-instance-types.yml @@ -37,13 +37,12 @@ jobs: role-to-assume: arn:aws:iam::486285699788:role/GithubActionsRole - name: Pull EC2 instance types from AWS - uses: technote-space/create-pr-action@v2 + run: | + pip install boto3 + scripts/get_instance_info.py + - name: Create PR + uses: peter-evans/create-pull-request@v4 with: - EXECUTE_COMMANDS: | - pip install boto3 - scripts/get_instance_info.py - COMMIT_MESSAGE: 'chore: update EC2 Instance Types' - COMMIT_NAME: 'Moto Admin' - COMMIT_EMAIL: 'admin@getmoto.org' - PR_BRANCH_NAME: 'chore-update-ec2-types-${{ github.run_number }}' - PR_TITLE: 'chore: update EC2 Instance Types' + branch: 'chore-update-ec2-types-${{ github.run_number }}' + title: 'chore: update EC2 Instance Types' + commit-message: 'chore: update EC2 Instance Types' diff --git a/.github/workflows/data-update_ssm-default-amis.yml b/.github/workflows/data-update_ssm-default-amis.yml index d4553b212..0f446dfba 100644 --- a/.github/workflows/data-update_ssm-default-amis.yml +++ b/.github/workflows/data-update_ssm-default-amis.yml @@ -37,14 +37,13 @@ jobs: role-to-assume: arn:aws:iam::486285699788:role/GithubActionsRole - name: Pull SSM default AMIs from AWS - uses: technote-space/create-pr-action@v2 + run: | + pip install boto3 + pip install moto[all] + python scripts/ssm_get_default_amis.py + - name: Create PR + uses: peter-evans/create-pull-request@v4 with: - EXECUTE_COMMANDS: | - pip install boto3 - pip install moto[all] - python scripts/ssm_get_default_amis.py - COMMIT_MESSAGE: "chore: update SSM default AMI's" - COMMIT_NAME: 'Moto Admin' - COMMIT_EMAIL: 'admin@getmoto.org' - PR_BRANCH_NAME: 'chore-update-ssm-amis-${{ github.run_number }}' - PR_TITLE: "chore: update SSM Instance AMI's" + branch: 'chore-update-ssm-amis-${{ github.run_number }}' + title: "chore: update SSM Instance AMI's" + commit-message: "chore: update SSM default AMI's" diff --git a/.github/workflows/data-update_ssm-default-parameters.yml b/.github/workflows/data-update_ssm-default-parameters.yml index f3f613cd0..bf77ee592 100644 --- a/.github/workflows/data-update_ssm-default-parameters.yml +++ b/.github/workflows/data-update_ssm-default-parameters.yml @@ -38,14 +38,13 @@ jobs: role-to-assume: arn:aws:iam::486285699788:role/GithubActionsRole - name: Pull SSM default Parameters from AWS - uses: technote-space/create-pr-action@v2 + run: | + pip install boto3 + pip install moto[all] + python scripts/ssm_get_default_params.py + - name: Create PR + uses: peter-evans/create-pull-request@v4 with: - EXECUTE_COMMANDS: | - pip install boto3 - pip install moto[all] - python scripts/ssm_get_default_params.py - COMMIT_MESSAGE: "chore: update SSM default parameters" - COMMIT_NAME: 'Moto Admin' - COMMIT_EMAIL: 'admin@getmoto.org' - PR_BRANCH_NAME: 'chore-update-ssm-params-${{ github.run_number }}' - PR_TITLE: "chore: update SSM Instance parameters" + branch: 'chore-update-ssm-params-${{ github.run_number }}' + title: "chore: update SSM Instance parameters" + commit-message: "chore: update SSM default parameters"