-
Notifications
You must be signed in to change notification settings - Fork 985
30 lines (30 loc) · 1.09 KB
/
sweeper.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Sweeper
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
sweeper:
permissions:
id-token: write # aws-actions/configure-aws-credentials@v4.0.1
if: vars.ACCOUNT_ID != '' || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
region: [us-east-2, us-west-2, eu-west-1]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1
with:
role-to-assume: arn:aws:iam::${{ vars.ACCOUNT_ID }}:role/${{ vars.ROLE_NAME }}
aws-region: ${{ matrix.region }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: test/hack/resource/go.mod
check-latest: true
cache-dependency-path: "test/hack/resource/go.sum"
- run: go run main.go
working-directory: ./test/hack/resource/clean
name: "Run cleanup script"