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 +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-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+ workflow_dispatch :
6+
7+ env :
8+ REGISTRY : ghcr.io
9+ IMAGE_NAME : ${{ github.repository }}
10+
11+ jobs :
12+ build-and-push :
13+ runs-on : " ubuntu-latest"
14+
15+ permissions :
16+ contents : read
17+ packages : write
18+
19+ steps :
20+ - uses : actions/checkout@v3
21+ - name : Log in to the Container registry
22+ uses : docker/login-action@v2
23+ with :
24+ registry : ${{ env.REGISTRY }}
25+ username : ${{ github.actor }}
26+ password : ${{ secrets.GITHUB_TOKEN }}
27+ - name : Extract metadata (tags, labels) for Docker
28+ id : meta
29+ uses : docker/metadata-action@v4
30+ with :
31+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
32+ - name : Build and push Docker image
33+ uses : docker/build-push-action@v3
34+ with :
35+ context : .
36+ push : true
37+ tags : ${{ steps.meta.outputs.tags }}
38+ 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