This repository was archived by the owner on May 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and publish a Docker image to ghcr.io
2+ on :
3+ push :
4+ tags : [ "v*.*.*" ]
5+ branches : [ "build-automation" ]
6+ workflow_dispatch :
7+
8+ env :
9+ REGISTRY : ghcr.io
10+ IMAGE_NAME : ${{ github.repository }}
11+
12+ jobs :
13+ build-and-push :
14+ runs-on : " ubuntu-latest"
15+
16+ permissions :
17+ contents : read
18+ packages : write
19+
20+ steps :
21+ - uses : actions/checkout@v3
22+ - name : Log in to the Container registry
23+ uses : docker/login-action@v2
24+ with :
25+ registry : ${{ env.REGISTRY }}
26+ username : ${{ github.actor }}
27+ password : ${{ secrets.GITHUB_TOKEN }}
28+ - name : Extract metadata (tags, labels) for Docker
29+ id : meta
30+ uses : docker/metadata-action@v4
31+ with :
32+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
33+ - name : Build and push Docker image
34+ uses : docker/build-push-action@v3
35+ with :
36+ context : .
37+ push : true
38+ tags : ${{ steps.meta.outputs.tags }}
39+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ RUN go mod download
1515COPY main.go main.go
1616COPY api/ api/
1717COPY controllers/ controllers/
18+ COPY pkg/ pkg/
1819
1920# Build
2021# the GOARCH has not a default value to allow the binary be built according to the host where the command
You can’t perform that action at this time.
0 commit comments