Skip to content
  • Sponsor
  • Notifications You must be signed in to change notification settings
  • Fork 1

Commit 07dff59

Browse files
authoredAug 31, 2023
Create builder.yml
1 parent 382b773 commit 07dff59

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
 

‎.github/workflows/builder.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
env:
6+
REGISTRY: ghcr.io
7+
IMAGE_NAME: ${{ github.repository }}
8+
9+
jobs:
10+
releases-matrix:
11+
name: Release Go Binary
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
goos: [linux]
16+
goarch: [amd64]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Log in to the Container registry
21+
uses: docker/login-action@v2.1.0
22+
with:
23+
registry: ${{ env.REGISTRY }}
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Extract metadata (tags, labels) for Docker
28+
id: meta
29+
uses: docker/metadata-action@v4.3.0
30+
with:
31+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
32+
33+
- name: Build and push Docker image
34+
uses: docker/build-push-action@v4.0.0
35+
with:
36+
context: .
37+
push: true
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)
Please sign in to comment.