-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.43 KB
/
push-container.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
name: Publish refresh service
on:
workflow_dispatch:
jobs:
build_refresh_service:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install zip and wget utils
run: mkdir ./circuits && sudo apt-get install -y zip unzip wget
- name: Get current branch name
id: branch-name
uses: tj-actions/branch-names@v7
- name: Download latest circuits 'latest.zip' from S3
if: steps.specific_circuits.outcome != 'success'
run: wget https://iden3-circuits-bucket.s3.eu-west-1.amazonaws.com/latest.zip -P ./circuits
- name: Unzip circuits to folder
if: steps.specific_circuits.outcome != 'success'
run: cd circuits && unzip latest.zip && cd - && pwd
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: build and deploy to ghcr.io
env:
GITHUB_REF: ${{ github.ref}}
run: |
ref="$(echo ${GITHUB_REF} | cut -d'/' -f3)"
echo GITHUB_REF - $ref
docker buildx build --push \
--platform linux/amd64 \
-t ghcr.io/0xpolygonid/refresh-service:${ref} -t ghcr.io/0xpolygonid/refresh-service:dev .