From 2ee5b212eb39837dee0160903b31ee4134e6da64 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Thu, 20 Jun 2024 13:35:41 -0700 Subject: [PATCH] mv cleaner before packer --- .github/workflows/release-public-ami.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/release-public-ami.yml b/.github/workflows/release-public-ami.yml index 208404bdd..69b2ff914 100644 --- a/.github/workflows/release-public-ami.yml +++ b/.github/workflows/release-public-ami.yml @@ -24,6 +24,21 @@ jobs: check-latest: true - run: go version + - name: install nodejs + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: install npx aws-amicleaner + run: npm install -g aws-amicleaner + + - name: clean up old AMIs + run: npx aws-amicleaner --include-name 'public-avalanchecli-ubuntu-*' --exclude-newest 1 --exclude-days 2 --region="*" --force + env: + AWS_ACCESS_KEY_ID: ${{ secrets.EXPERIMENTAL_AWS_ACCESS_KEY_PACKER }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.EXPERIMENTAL_AWS_SECRET_KEY_PACKER }} + AWS_REGION: us-east-1 + - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 with: