Skip to content

Commit

Permalink
feat: define file bumper image
Browse files Browse the repository at this point in the history
  • Loading branch information
rcwbr committed Dec 1, 2024
1 parent cad7c48 commit 9854cb7
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
68 changes: 68 additions & 0 deletions file-bumper/.release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"git": {
"getLatestTagFromAllRefs": true,
"commit": true,
"tag": true,
"pushArgs": ["--tags"],
"tagName": "${version}"
},
"github": {
"release": true
},
"plugins": {
"@release-it/bumper": {
"out": {
"file": "VERSION",
"type": "text/plain",
"consumeWholeFile": true
}
},
"@release-it/conventional-changelog": {
"preset": {
"name": "conventionalcommits",
"types": [
{
"type": "feat",
"section": ":rocket: Features"
},
{
"type": "fix",
"section": ":bug: Bug fixes"
},
{
"type": "build",
"section": ":package: Build"
},
{
"type": "ci",
"section": ":robot: CI/CD"
},
{
"type": "docs",
"section": ":page_facing_up: Docs"
},
{
"type": "perf",
"section": ":checkered_flag: Performance"
},
{
"type": "refactor",
"section": ":twisted_rightwards_arrows: Refactor"
},
{
"type": "style",
"section": ":broom: Style"
},
{
"type": "test",
"section": ":test_tube: Tests"
},
{
"type": "chore",
"hidden": true
}
]
}
}
}
}
4 changes: 4 additions & 0 deletions file-bumper/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM base

RUN npm install -g @release-it/bumper
COPY .release-it.json /.release-it.json
12 changes: 12 additions & 0 deletions file-bumper/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Expected to be used with https://github.com/rcwbr/dockerfile-partials/blob/main/github-cache-bake.hcl
// For example, docker buildx bake -f github-cache-bake.hcl -f cwd://docker-bake.hcl https://github.com/rcwbr/dockerfile-partials.git#0.1.0

target "default" {
contexts = {
base = (
("${GITHUB_REF_PROTECTED}" == "true" || "${GITHUB_REF_TYPE}" == "tag" )
? "docker-image://${REGISTRY}release-it-docker-conventional-changelog:${VERSION}"
: "docker-image://${REGISTRY}release-it-docker-conventional-changelog:${VERSION}-${GITHUB_SHA}"
)
}
}

0 comments on commit 9854cb7

Please sign in to comment.