-
Notifications
You must be signed in to change notification settings - Fork 39
116 lines (101 loc) · 3.59 KB
/
docker.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Docker Build and Push
# Build & Push builds the simapp docker image on every push to master
# and pushes the image to https://hub.docker.com/u/provenanceio
on:
pull_request:
paths:
- docker/blockchain/Dockerfile
- .github/workflows/docker.yml
push:
branches:
- main
tags:
- '**'
env:
DOCKER_IMAGE: "provenanceio/provenance"
# Set concurrency for this workflow to cancel in-progress jobs if retriggered.
# The github.ref is only available when triggered by a PR so fall back to github.run_id for other cases.
# The github.run_id is unique for each run, giving each such invocation it's own unique concurrency group.
# Basically, if you push to a PR branch, jobs that are still running for that PR will be cancelled.
# But jobs started because of a merge to main or a release tag push are not cancelled.
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
heighliner-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-qemu-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.DOCKER_IMAGE }}
flavor: |
prefix=heighliner-,onlatest=true
tags: |
type=edge
type=ref,event=pr
type=ref,event=tag
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# use forked branch until https://github.com/strangelove-ventures/heighliner/issues/253 is fixed
# heighliner does not support the wasmvm pathing yet so a "pre-build" step is required
# lock to "linux/amd64" only for now due to differing "pre-build" steps
# https://github.com/CosmWasm/wasmvm/blob/main/docs/MIGRATING.md
- uses: strangelove-ventures/heighliner-build-action@main
with:
heighliner-owner: ProvLabs
heighliner-tag: v1.6.3
chain: provenance
local: true
tag: ${{ steps.meta.outputs.version }}
registry: provenanceio
platform: linux/amd64
dockerfile: cosmos
build-target: |
cd ..
make install
binaries: |
- /go/bin/provenanced
pre-build: |
cp /lib/libwasmvm_muslc.a /lib/libwasmvm_muslc.x86_64.a
build-env: |
- "WITH_LEDGER=false"
- "BUILD_TAGS=muslc musl dynamic"
skip: ${{ github.event_name == 'pull_request' }}
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- run: go mod vendor
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-qemu-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.DOCKER_IMAGE }}
tags: |
type=edge
type=ref,event=pr
type=ref,event=tag
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
context: .
target: run
build-args: |
VERSION=${{ steps.meta.outputs.version }}
platforms: linux/amd64,linux/arm64
file: docker/blockchain/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}