-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (58 loc) · 1.74 KB
/
release-to-dockerhub.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: release-to-dockerhub
on:
workflow_dispatch:
#pull_request:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY_IMAGE: public.ecr.aws/f8p9h8d2/mobilecoind
jobs:
docker:
runs-on: [ "ubuntu-16core" ]
strategy:
matrix:
network: ["test", "prod"]
steps:
- name: Show ref
run: |
echo "Ref is ${{ github.ref_name }}"
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ECR_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_ECR_ACCESS_KEY_SECRET }}
aws-region: us-east-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
with:
mask-password: true
registry-type: public
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}-${{ matrix.network }}
- name: Print tags
run: |
echo "Tags: ${{ steps.meta.outputs.tags }}"
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false # needed for AWS ECR
build-args: |
NETWORK=${{ matrix.network }}.mobilecoin.com