Skip to content

Commit 5abdd16

Browse files
committed
Add GitHub Action to build and push
Signed-off-by: Silvio Moioli <[email protected]>
1 parent 0a45cac commit 5abdd16

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
- name: Set up QEMU
13+
uses: docker/setup-qemu-action@v2
14+
- name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v2
16+
- name: Login to GitHub Container Registry
17+
uses: docker/login-action@v2
18+
with:
19+
registry: ghcr.io
20+
username: ${{ github.repository_owner }}
21+
password: ${{ secrets.GITHUB_TOKEN }}
22+
- name: Build and Push Docker Image
23+
uses: docker/build-push-action@v3
24+
with:
25+
context: "{{defaultContext}}:package"
26+
platforms: linux/amd64,linux/arm64
27+
push: true
28+
build-args: |
29+
GO_VERSION=1.18
30+
DLV_VERSION=${{ github.ref_name }}
31+
tags: |
32+
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
33+
ghcr.io/${{ github.repository }}:latest

0 commit comments

Comments
 (0)