From 9eec54019b1e34001c01a1184bbf549248bd87ff Mon Sep 17 00:00:00 2001 From: Eric Weber Date: Sat, 16 Nov 2024 16:55:43 -0800 Subject: [PATCH] feat: add file-bumper image --- file-bumper/.release-it.json | 69 ++++++++++++++++++++++++++++++++++++ file-bumper/Dockerfile | 4 +++ file-bumper/docker-bake.hcl | 12 +++++++ 3 files changed, 85 insertions(+) create mode 100644 file-bumper/.release-it.json create mode 100644 file-bumper/Dockerfile create mode 100644 file-bumper/docker-bake.hcl diff --git a/file-bumper/.release-it.json b/file-bumper/.release-it.json new file mode 100644 index 0000000..3ef962a --- /dev/null +++ b/file-bumper/.release-it.json @@ -0,0 +1,69 @@ +{ + "git": { + "commit": false, + "tag": true, + "tagName": "${version}" + }, + "github": { + "release": true + }, + "plugins": { + "@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 + } + ] + } + }, + "@release-it/bumper": { + "in": { + "file": "VERSION", + "type": "text/plain" + }, + "out": { + "file": "VERSION", + "type": "text/plain" + } + } + } +} diff --git a/file-bumper/Dockerfile b/file-bumper/Dockerfile new file mode 100644 index 0000000..33770c0 --- /dev/null +++ b/file-bumper/Dockerfile @@ -0,0 +1,4 @@ +FROM base + +RUN npm install -g @release-it/bumper +COPY .release-it.json /.release-it.json diff --git a/file-bumper/docker-bake.hcl b/file-bumper/docker-bake.hcl new file mode 100644 index 0000000..d4aab2d --- /dev/null +++ b/file-bumper/docker-bake.hcl @@ -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}" + ) + } +}