-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.63 KB
/
release.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
name: Release
on:
release:
types: [ "published" ]
jobs:
publish:
runs-on: "ubuntu-latest"
env:
GAR_REGISTRY: us-east1-docker.pkg.dev
GAR_IMAGE: zap-strike-infrastructure/zap-container-registry/bitcoin-blended-fee-estimator
DOCKERHUB_IMAGE: lnzap/bitcoin-blended-fee-estimator
steps:
- name: Checkout Code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3
- name: Set version
run: echo "VERSION=$(echo ${{ github.ref }} | awk -F 'v' '{print $2}')" >> $GITHUB_ENV
- name: 'Setup Google Artifact Registry'
uses: LN-Zap/zap-github-actions/.github/actions/setup-google-artifact-registry@master
with:
registry: us-east1-docker.pkg.dev
credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_ARTIFACT_REGISTRY }}
- name: Dockerhub login
run: "docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}"
- uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # pin@v2
- uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # pin@v2
- uses: docker/build-push-action@1104d471370f9806843c095c1db02b5a90c5f8b6 # pin@v3
with:
push: true
tags: |
${{ env.GAR_REGISTRY }}/${{ env.GAR_IMAGE }}:${{ env.VERSION }}
${{ env.GAR_REGISTRY }}/${{ env.GAR_IMAGE }}:latest
${{ env.DOCKERHUB_IMAGE }}:latest
${{ env.DOCKERHUB_IMAGE }}:${{ env.VERSION }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=min