File tree Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 40
40
# on your needs.
41
41
- name : Configure git for private modules
42
42
run : git config --global url."https://speakeasybot:${{ secrets.BOT_REPO_TOKEN }}@github.com".insteadOf "https://github.com"
43
+ - name : Login to GitHub Container Registry
44
+ uses : docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
45
+ with :
46
+ registry : ghcr.io
47
+ username : ${{ github.actor }}
48
+ password : ${{ secrets.BOT_REPO_TOKEN }}
43
49
- name : Setup Choco
44
50
uses : crazy-max/ghaction-chocolatey@2526f467ccbd337d307fe179959cabbeca0bc8c0 # v3.4.0
45
51
with :
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ builds:
15
15
- linux
16
16
- windows
17
17
- darwin
18
+ goarch :
19
+ - amd64
20
+ - arm64
21
+ ignore :
22
+ - goos : windows
23
+ goarch : arm64 # Windows ARM64 can be enabled if needed
18
24
ldflags :
19
25
- " -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser -X main.artifactArch={{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
20
26
archives :
@@ -32,6 +38,26 @@ changelog:
32
38
exclude :
33
39
- " ^docs:"
34
40
- " ^test:"
41
+
42
+ dockers_v2 :
43
+ - id : speakeasy
44
+ dockerfile : Dockerfile
45
+ ids : [speakeasy]
46
+ images :
47
+ - ghcr.io/speakeasy-api/speakeasy
48
+ tags :
49
+ - " {{ .Tag }}"
50
+ - " latest"
51
+ platforms :
52
+ - linux/amd64
53
+ - linux/arm64
54
+ labels :
55
+ org.opencontainers.image.title : " {{ .ProjectName }}"
56
+ org.opencontainers.image.version : " {{ .Version }}"
57
+ org.opencontainers.image.revision : " {{ .Commit }}"
58
+ org.opencontainers.image.source : " {{ .GitURL }}"
59
+ org.opencontainers.image.created : " {{ .Date }}"
60
+
35
61
brews :
36
62
- name : speakeasy
37
63
repository :
Original file line number Diff line number Diff line change
1
+ FROM debian:12-slim
2
+
3
+ # Install only sudo (required by Speakeasy CLI)
4
+ RUN apt-get update && \
5
+ apt-get install -y --no-install-recommends \
6
+ sudo \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Create a non-root user with sudo access
10
+ RUN groupadd -g 1001 speakeasy && \
11
+ useradd -u 1001 -g speakeasy -m -s /bin/bash speakeasy && \
12
+ echo 'speakeasy ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
13
+
14
+ USER speakeasy
15
+
16
+ # Copy the binary from GoReleaser build context
17
+ # GoReleaser will automatically use the correct binary for the target architecture
18
+ COPY speakeasy /usr/local/bin/speakeasy
19
+
20
+ # Make the binary executable
21
+ RUN chmod +x /usr/local/bin/speakeasy
22
+
23
+ # Default entrypoint
24
+ ENTRYPOINT ["speakeasy" ]
25
+ CMD ["--version" ]
You can’t perform that action at this time.
0 commit comments