File tree Expand file tree Collapse file tree 17 files changed +2001
-194
lines changed
Expand file tree Collapse file tree 17 files changed +2001
-194
lines changed Original file line number Diff line number Diff line change 1+ # .dockerignore
2+ # Docker build context exclusions for optimal build performance and security
3+
4+ # Git and version control
5+ .git /
6+ .github /
7+ .gitignore
8+ .gitattributes
9+
10+ # Build artifacts and binaries
11+ openmorph
12+ * .exe
13+ * .dll
14+ * .so
15+ * .dylib
16+ * .test
17+ * .out
18+ /bin /
19+ /build /
20+ /dist /
21+
22+ # Development and testing
23+ .vscode /
24+ .idea /
25+ * .swp
26+ * .swo
27+ * ~
28+ .DS_Store
29+ Thumbs.db
30+
31+ # Go specific
32+ vendor /
33+ * .mod.backup
34+ * .sum.backup
35+
36+ # Documentation and examples
37+ * .md
38+ docs /
39+ examples /
40+ /templates /
41+
42+ # CI/CD and deployment
43+ .github /
44+ .gitlab-ci.yml
45+ .travis.yml
46+ .circleci /
47+ Jenkinsfile
48+ docker-compose * .yml
49+ * .dockerfile
50+ Dockerfile. *
51+
52+ # Logs and temporary files
53+ * .log
54+ * .tmp
55+ * .temp
56+ /tmp /
57+ /logs /
58+
59+ # Test files and coverage
60+ * _test.go
61+ * .coverage
62+ coverage.out
63+ * .prof
64+
65+ # Development scripts and tools
66+ scripts /
67+ tools /
68+ Makefile
69+ * .sh
70+
71+ # Package manager files (keep go.mod and go.sum)
72+ package * .json
73+ yarn.lock
74+ Pipfile *
75+ requirements * .txt
76+
77+ # Configuration files (exclude sensitive configs)
78+ .env *
79+ * .yaml.bak
80+ * .yml.bak
81+ * .json.bak
82+ config.local. *
83+
84+ # Release and distribution
85+ .goreleaser.yml
86+ .version
87+ VERSION *
88+ CHANGELOG *
89+ AUTO_RELEASE_GUIDE.md
90+ PRODUCTION_READINESS.md
91+ VERSION_MANAGEMENT.md
Original file line number Diff line number Diff line change 77 workflow_dispatch :
88 inputs :
99 version :
10- description : ' Version to release (leave empty to use .version file)'
10+ description : " Version to release (leave empty to use .version file)"
1111 required : false
1212 type : string
1313
@@ -23,12 +23,22 @@ jobs:
2323 - uses : actions/checkout@v4
2424 with :
2525 fetch-depth : 0
26-
26+
2727 - name : Set up Go
2828 uses : actions/setup-go@v5
2929 with :
3030 go-version : " 1.24"
31-
31+
32+ - name : Set up Docker Buildx
33+ uses : docker/setup-buildx-action@v3
34+
35+ - name : Log in to GitHub Container Registry
36+ uses : docker/login-action@v3
37+ with :
38+ registry : ghcr.io
39+ username : ${{ github.actor }}
40+ password : ${{ secrets.GITHUB_TOKEN }}
41+
3242 - name : Get version from file
3343 id : version
3444 run : |
4151 fi
4252 echo "version=$VERSION" >> $GITHUB_OUTPUT
4353 echo "Using version: $VERSION"
44-
54+
4555 - name : Create tag if needed
4656 if : github.event_name == 'workflow_dispatch'
4757 run : |
5060 git tag -a "$VERSION" -m "Release $VERSION"
5161 git push origin "$VERSION"
5262 fi
53-
63+
5464 - name : Run GoReleaser
5565 uses : goreleaser/goreleaser-action@v6
5666 with :
Original file line number Diff line number Diff line change @@ -28,6 +28,42 @@ release:
2828 owner : developerkunal
2929 name : OpenMorph
3030
31+ # Docker images
32+ dockers :
33+ - image_templates :
34+ - " ghcr.io/developerkunal/openmorph:{{ .Tag }}"
35+ - " ghcr.io/developerkunal/openmorph:v{{ .Major }}"
36+ - " ghcr.io/developerkunal/openmorph:v{{ .Major }}.{{ .Minor }}"
37+ - " ghcr.io/developerkunal/openmorph:latest"
38+ dockerfile : Dockerfile
39+ build_flag_templates :
40+ - " --pull"
41+ - " --label=org.opencontainers.image.created={{.Date}}"
42+ - " --label=org.opencontainers.image.title={{.ProjectName}}"
43+ - " --label=org.opencontainers.image.revision={{.FullCommit}}"
44+ - " --label=org.opencontainers.image.version={{.Version}}"
45+ - " --label=org.opencontainers.image.source={{.GitURL}}"
46+ - " --build-arg=VERSION={{.Version}}"
47+ extra_files :
48+ - go.mod
49+ - go.sum
50+ - image_templates :
51+ - " ghcr.io/developerkunal/openmorph:{{ .Tag }}-distroless"
52+ - " ghcr.io/developerkunal/openmorph:v{{ .Major }}-distroless"
53+ - " ghcr.io/developerkunal/openmorph:v{{ .Major }}.{{ .Minor }}-distroless"
54+ dockerfile : Dockerfile.distroless
55+ build_flag_templates :
56+ - " --pull"
57+ - " --label=org.opencontainers.image.created={{.Date}}"
58+ - " --label=org.opencontainers.image.title={{.ProjectName}}"
59+ - " --label=org.opencontainers.image.revision={{.FullCommit}}"
60+ - " --label=org.opencontainers.image.version={{.Version}}"
61+ - " --label=org.opencontainers.image.source={{.GitURL}}"
62+ - " --build-arg=VERSION={{.Version}}"
63+ extra_files :
64+ - go.mod
65+ - go.sum
66+
3167# Homebrew tap
3268brews :
3369 - name : openmorph
You can’t perform that action at this time.
0 commit comments