Skip to content

Commit a46fff6

Browse files
author
Markus Schwer
committed
Initial commit
0 parents  commit a46fff6

29 files changed

+1670
-0
lines changed

.github/workflows/release.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
env:
9+
GO_VERSION: "1.24.1"
10+
11+
jobs:
12+
publish:
13+
if: startsWith(github.ref, 'refs/tags/v') == true
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version: ${{ env.GO_VERSION }}
19+
check-latest: true
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- id: set_version
23+
run: |
24+
VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p')
25+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
26+
- name: Generate release artifacts
27+
run: |
28+
make release VERSION=${{ steps.set_version.outputs.version }}
29+
- name: Save release artifacts
30+
uses: softprops/action-gh-release@v2
31+
with:
32+
files: release/*

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/
2+
release/
3+
bin/

.golangci.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
run:
2+
timeout: 10m
3+
go: "1.23"
4+
skip-files:
5+
- "zz_generated.*\\.go$"
6+
allow-parallel-runners: true
7+
8+
linters:
9+
disable-all: true
10+
enable:
11+
- asasalint
12+
- asciicheck
13+
- bidichk
14+
- bodyclose
15+
- containedctx
16+
- depguard
17+
- dogsled
18+
- dupword
19+
- durationcheck
20+
- errcheck
21+
- errchkjson
22+
- exportloopref
23+
- ginkgolinter
24+
- goconst
25+
- gocritic
26+
- godot
27+
- gofmt
28+
- goimports
29+
- goprintffuncname
30+
- gosec
31+
- gosimple
32+
- govet
33+
- importas
34+
- ineffassign
35+
- misspell
36+
- nakedret
37+
- nilerr
38+
- noctx
39+
- nolintlint
40+
- nosprintfhostport
41+
- prealloc
42+
- predeclared
43+
- revive
44+
- rowserrcheck
45+
- staticcheck
46+
- stylecheck
47+
- typecheck
48+
- unconvert
49+
- unused
50+
- usestdlibvars
51+
- whitespace
52+
- unparam
53+
54+
linters-settings:
55+
ginkgolinter:
56+
# Suppress the wrong length assertion warning.
57+
suppress-len-assertion: false
58+
# Suppress the wrong nil assertion warning.
59+
suppress-nil-assertion: false
60+
# Suppress the wrong error assertion warning.
61+
suppress-err-assertion: true
62+
stylecheck:
63+
checks: ["all", "-ST1000", "-ST1020"]
64+
nolintlint:
65+
allow-unused: false
66+
allow-leading-space: false
67+
require-specific: true
68+
revive:
69+
rules:
70+
- name: blank-imports
71+
- name: context-as-argument
72+
- name: context-keys-type
73+
- name: dot-imports
74+
- name: error-return
75+
- name: error-strings
76+
- name: error-naming
77+
- name: if-return
78+
- name: increment-decrement
79+
- name: var-naming
80+
- name: var-declaration
81+
- name: range
82+
- name: receiver-naming
83+
- name: time-naming
84+
- name: unexported-return
85+
- name: indent-error-flow
86+
- name: errorf
87+
- name: empty-block
88+
- name: superfluous-else
89+
- name: unreachable-code
90+
- name: redefines-builtin-id
91+
- name: bool-literal-in-expr
92+
- name: constant-logical-expr
93+
# Disabled for now, but will be enabled as soon as possible
94+
# - name: exported
95+
# - name: package-comments
96+
# - name: unused-parameter
97+
issues:
98+
max-same-issues: 0
99+
max-issues-per-linter: 0

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/devpod-provider-stackit.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM golang AS builder
2+
ARG GIT_COMMIT
3+
ARG GIT_REPO="github.com/stackitcloud/devpod-provider-stackit"
4+
ARG PROJECT_NAME="devpod-provider-stackit"
5+
ARG VERSION
6+
WORKDIR /app
7+
COPY . .
8+
ENV CGO_ENABLED=0
9+
ENV GOOS=linux
10+
ENV PROJECT_NAME="${PROJECT_NAME}"
11+
RUN go build \
12+
-ldflags \
13+
"-w -s -X $GIT_REPO/cmd.Version=$VERSION -X $GIT_REPO/cmd.GitCommit=$GIT_COMMIT" \
14+
-o /app/app
15+
ENTRYPOINT [ "/app/app" ]
16+
17+
FROM scratch
18+
WORKDIR /app
19+
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
20+
COPY --from=builder /app/app /app
21+
ENTRYPOINT [ "/app/app" ]

0 commit comments

Comments
 (0)