-
Notifications
You must be signed in to change notification settings - Fork 983
30 lines (30 loc) · 1.14 KB
/
resource-count.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: ResourceCount
on:
schedule:
- cron: '3 */1 * * *' # every hour
workflow_dispatch:
permissions:
id-token: write # aws-actions/configure-aws-credentials@v4.0.1
jobs:
counter:
if: vars.CI_ACCOUNT_ID != '' || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
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@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: arn:aws:iam::${{ vars.CI_ACCOUNT_ID }}:role/${{ vars.CI_ROLE_NAME }}
aws-region: ${{ matrix.region }}
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.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/count
name: "Run resource count script"