From adafa3c5c4342ae72c317d0f28583452651256dd Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Fri, 25 Oct 2024 11:17:52 +0200 Subject: [PATCH] delete old AMIs script --- .github/workflows/build-aws-pro-beta.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/build-aws-pro-beta.yaml b/.github/workflows/build-aws-pro-beta.yaml index 0ab5d5ce..cc64ee97 100644 --- a/.github/workflows/build-aws-pro-beta.yaml +++ b/.github/workflows/build-aws-pro-beta.yaml @@ -119,3 +119,20 @@ jobs: AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} AWS_DEFAULT_REGION: ${{secrets.AWS_DEFAULT_REGION}} + + - name: Install AWS CLI + run: | + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip awscliv2.zip + sudo ./aws/install + sudo apt-get install jq -y + + - name: Delete old AMIs + run: | + cd ../dbgate-merged/packer + chmod +x delete-old-amis.sh + ./delete-old-amis.sh + env: + AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} + AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} + AWS_DEFAULT_REGION: ${{secrets.AWS_DEFAULT_REGION}}