Repository navigation
61 lines (55 loc) · 1.84 KB
/
Copy pathtestnets_build.yml
File metadata and controls
61 lines (55 loc) · 1.84 KB
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
# Build and Push Docker Images using Docker Bake
name: Build and Push Images for Testnets
on:
push:
branches:
- chain/test*
workflow_dispatch:
permissions:
contents: read
actions: write # useful for gha caching
packages: write
jobs:
bake:
strategy:
matrix:
image: [gnoland,gnokey,gnoweb,gno,gnofaucet,gnodev,gnocontribs]
runs-on: ubuntu-latest
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata
uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/${{ github.repository }}/${{ matrix.image }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha,prefix=sha-
# Timestamp (optional, good for nightly builds)
#type=raw,value={{date 'YYYYMMDD-HHmmss'}},prefix=ts- # e.g. "ts-20250410-153001"
# Latest tag (only on main branch, optional)
#type=raw,value=latest,enable={{ is_default_branch }}
labels: |
org.opencontainers.image.authors=Gno Core Team
# Using Github Context. Overriding context with an explicit `set` is required
- name: Bake build and push
uses: docker/bake-action@v6
with:
files: |
misc/deployments/bake/docker-bake.hcl
cwd://${{ steps.meta.outputs.bake-file-tags }}
cwd://${{ steps.meta.outputs.bake-file-labels }}
push: true
targets: ${{ matrix.image }}
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
*.context=.