-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (50 loc) · 1.41 KB
/
ci.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
name: ci
run-name: ci ${{ github.event_name}} ${{ github.ref_name }} by ${{ github.actor }}
on:
schedule:
- cron: '20 11 * * *'
pull_request:
push:
branches: [master]
workflow_dispatch:
inputs:
env:
type: environment
ref:
description: 'Branch, Tag, or SHA'
required: true
concurrency:
group: test-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
env:
REFERENCE: ${{ github.event.pull_request.head.sha || github.event.push.head_commit.id }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions
role-session-name: gha
aws-region: us-west-2
- uses: actions/checkout@v3
with:
ref: ${{ env.REFERENCE }}
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
with:
install: true
version: latest
- id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- run: make build
env:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
# - uses: docker/build-push-action@v4
# with:
# push: true
# tags: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.us-west-2.amazonaws.com/eimmigrate:${{ env.REFERENCE }}