Skip to content

Sweeper

Sweeper #1293

Workflow file for this run

name: Sweeper
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
sweeper:
permissions:
id-token: write # aws-actions/[email protected]
if: vars.CI_ACCOUNT_ID != '' || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
max-parallel: 1
matrix:
region: [us-east-2, us-west-2, eu-west-1, eu-north-1, us-east-1]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
role-to-assume: arn:aws:iam::${{ vars.CI_ACCOUNT_ID }}:role/${{ vars.CI_ROLE_NAME }}
aws-region: ${{ matrix.region }}
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: test/hack/resource/go.mod
check-latest: true
cache-dependency-path: "test/hack/resource/go.sum"
# eu-north-1 contains the soak tests and resources should be swept if they are older than 8 days
- run: |
if [[ "${{ matrix.region }}" == "eu-north-1" ]]; then
go run main.go --expiration 192h
else
go run main.go --expiration 12h
fi
working-directory: ./test/hack/resource/clean
name: "Run cleanup script"