File tree Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Multiple Architecture Image Build
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - " main"
8+ - " release/*"
9+ tags :
10+ - " v*"
11+
12+ concurrency :
13+ group : build-${{ github.ref }}
14+ cancel-in-progress : true
15+
16+ jobs :
17+ image-build :
18+ uses : securesign/rhtas-console-ui/.github/workflows/build-push-images.yaml@main
19+ with :
20+ registry : " ghcr.io"
21+ image_name : " ${{ github.repository_owner }}/rhtas-console"
22+ containerfile : " ./Dockerfile"
23+ architectures : ' [ "amd64", "arm64" ]'
24+ extra-args : " --ulimit nofile=4096:4096"
25+ secrets :
26+ registry_username : ${{ github.actor }}
27+ registry_password : ${{ secrets.GITHUB_TOKEN }}
28+
29+ attestations :
30+ needs : image-build
31+ runs-on : ubuntu-latest
32+ permissions :
33+ id-token : write
34+ contents : read
35+ attestations : write
36+ packages : write
37+ steps :
38+ - name : Log in to registry
39+ uses : redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1
40+ with :
41+ username : ${{ github.actor }}
42+ password : ${{ secrets.GITHUB_TOKEN }}
43+ registry : ghcr.io
44+ - name : Generate artifact attestation
45+ uses : actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3
46+ with :
47+ subject-name : ghcr.io/${{ github.repository_owner }}/rhtas-console
48+ subject-digest : ${{ needs.image-build.outputs.digest }}
49+ push-to-registry : true
50+
Original file line number Diff line number Diff line change 1+ # Build stage
2+ FROM golang:1.25 AS builder
3+
4+ WORKDIR /app
5+
6+ COPY . .
7+
8+ RUN go build -buildvcs=false -o rhtas_console ./cmd/rhtas_console
9+
10+ # Final stage
11+ FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6
12+
13+ # Set a writable working directory
14+ WORKDIR /tmp
15+ ENV HOME=/tmp
16+
17+ COPY --from=builder /app/rhtas_console /tmp/rhtas_console
18+ COPY internal/db/migrations /tmp/internal/db/migrations
19+
20+ USER 65532:65532
21+
22+ # Expose API port
23+ EXPOSE 8080
24+
25+ # ENTRYPOINT
26+ ENTRYPOINT ["/tmp/rhtas_console" ]
You can’t perform that action at this time.
0 commit comments