forked from ping-pub/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.22 KB
/
aws-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: "AWS ECR: pingpub"
on:
push:
branches:
- "chains/xion"
workflow_dispatch:
jobs:
build:
name: Build Image
runs-on: ubuntu-latest
environment: CI
permissions:
id-token: write
contents: read
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_OIDC_ROLE }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: 385156030167.dkr.ecr.us-east-1.amazonaws.com/burnt/pingpub
tags: |
type=semver,pattern={{version}},priority=1000
type=sha,priority=700
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max