-
Notifications
You must be signed in to change notification settings - Fork 174
52 lines (40 loc) · 1.51 KB
/
nightly-ecr.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Test ECR Publishing
on:
schedule:
- cron: '0 7 * * * ' ## Every day at 0700 UTC
workflow_dispatch: ## Give us the ability to run this manually
# Abort prior jobs in the same workflow / PR
concurrency:
group: ecr-publish-${{ github.ref }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup golang
uses: ./.github/actions/golang
- name: Build the Zarf binary
run: make build-cli-linux-amd
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1
with:
role-to-assume: ${{ secrets.AWS_NIGHTLY_ROLE }}
aws-region: us-east-1
# NOTE: The aws cli will need to be explicitly installed on self-hosted runners
- name: Login to the ECR Registry
run: aws ecr-public get-login-password --region us-east-1 | ./build/zarf tools registry login --username AWS --password-stdin public.ecr.aws
- name: Test publishing and pulling to ECR
run: go test ./src/test/nightly/ecr_publish_test.go
- name: Save logs
if: always()
uses: ./.github/actions/save-logs
- name: Send trigger to Slack on workflow failure
if: failure()
uses: ./.github/actions/slack
with:
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}