Skip to content

Commit c149416

Browse files
authored
Merge pull request #3 from akash-network/ci-release
ci: add docker build and push
2 parents 909ed2a + fa3f925 commit c149416

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/release.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: release
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
tags:
9+
- "v*"
10+
11+
permissions:
12+
contents: write
13+
id-token: write
14+
packages: write
15+
16+
jobs:
17+
goreleaser:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
- uses: actions/setup-go@v5
24+
with:
25+
go-version: stable
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
- uses: docker/login-action@v2
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.repository_owner }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
- name: Docker meta
36+
id: meta
37+
uses: docker/metadata-action@v5
38+
with:
39+
# list of Docker images to use as base name for tags
40+
images: |
41+
ghcr.io/akash-network/demo-app
42+
# generate Docker tags based on the following events/attributes
43+
tags: |
44+
type=semver,pattern={{major}}.{{minor}}.{{patch}},prefix=v
45+
- name: Build and push
46+
uses: docker/build-push-action@v6
47+
with:
48+
context: .
49+
platforms: linux/amd64,linux/arm64
50+
push: true
51+
tags: ${{ steps.meta.outputs.tags }}
52+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)