forked from ping-pub/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.24 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
name: "AWS ECR: pingpub"
on:
push:
branches:
- "chains/xion"
workflow_dispatch:
jobs:
build:
name: Build Image
runs-on: ubuntu-latest
environment: CI
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- 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