From 498232bb53461d3f09bb34ba0b564d20cfc0b986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sat, 24 Oct 2026 12:44:22 +0200 Subject: [PATCH 1/2] CI: date versions from VERSION Add a VERSION file, make version/release, an extra : tag on latest and a release job. --- .github/workflows/docker.yml | 37 ++++++++++++++++++++++++++++++++++-- AGENTS.md | 1 + Makefile | 11 +++++++++++ README.md | 7 +++++++ VERSION | 1 + 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 VERSION diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0eb4e4e..a4ea9cd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -36,17 +36,50 @@ jobs: - name: "Test image" run: "make test" + version: + name: "Version" + runs-on: ubuntu-latest + outputs: + version: ${{ steps.version.outputs.version }} + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Read VERSION + id: version + run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" + build: name: "Build" - needs: ["test"] + needs: ["test", "version"] + strategy: + fail-fast: false + matrix: + tag: ["latest", "${{ needs.version.outputs.version }}"] if: github.ref == 'refs/heads/master' uses: dockette/.github/.github/workflows/docker.yml@master secrets: inherit with: image: "dockette/pound" - tag: "latest" + tag: ${{ matrix.tag }} context: "." + release: + name: "Release" + needs: build + if: github.ref == 'refs/heads/master' && github.event_name == 'push' + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Create release + env: + GH_TOKEN: ${{ github.token }} + run: gh release view "$(cat VERSION)" || gh release create "$(cat VERSION)" --generate-notes + docs: name: "Docs" needs: ["build"] diff --git a/AGENTS.md b/AGENTS.md index 8786368..463c6ea 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,6 +17,7 @@ Dockette Pound builds `dockette/pound`, a legacy Pound HTTP/HTTPS reverse proxy - `make build` builds `${DOCKER_IMAGE}:${DOCKER_TAG}` from `.`. - `make test` runs `pound -V` and validates `/etc/pound/config.cfg` with `pound -c -f` inside the built image. - `make run` starts the image locally with `80:80` published. +- `VERSION` is the release date; `make release` bumps it. CI pushes `latest` also as `` and creates the GitHub release. ## Testing Notes diff --git a/Makefile b/Makefile index 6dbb47d..40caa8f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ DOCKER_IMAGE=dockette/pound DOCKER_TAG?=latest +VERSION:=$(shell cat VERSION) .PHONY: build build: @@ -13,3 +14,13 @@ test: .PHONY: run run: docker run --rm -it -p 80:80 ${DOCKER_IMAGE}:${DOCKER_TAG} + +.PHONY: version +version: + @echo ${VERSION} + +.PHONY: release +release: + @date -u +%Y.%m.%d > VERSION + @echo "VERSION: ${VERSION} -> $$(cat VERSION)" + @echo "next: git commit -am \"Release: $$(cat VERSION)\" && git push" diff --git a/README.md b/README.md index b50d069..b548f68 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,11 @@ docker run --rm -it \ This image is intentionally kept close to the original legacy setup. It uses the official `debian:trixie-slim` base image and Debian Trixie `pound` package, so changes should stay focused on keeping the existing image buildable and testable. +## Versions + +The release version is the date in [`VERSION`](VERSION). CI pushes `latest` also as `dockette/pound:`. +To release, run `make release`, commit and push to `master`. + ## Development Build a local image before running tests or starting the container: @@ -48,6 +53,8 @@ Build a local image before running tests or starting the container: make build make test make run +make version +make release ``` ## Maintenance diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..7387f12 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +2026.10.23 From 3cbdd02af8964c86a596a3f62106cacfbc777d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sun, 25 Oct 2026 20:38:51 +0100 Subject: [PATCH 2/2] CI: versions like tika Key=value VERSION, one inline build job pushing all tags, simplified README with a Versions table. --- .github/workflows/docker.yml | 53 ++++++++++++++++++++------------- AGENTS.md | 4 +-- Makefile | 8 ++--- README.md | 57 ++++++++++++++++-------------------- VERSION | 2 +- 5 files changed, 65 insertions(+), 59 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a4ea9cd..1e91a3b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -36,33 +36,42 @@ jobs: - name: "Test image" run: "make test" - version: - name: "Version" + build: + name: "Build" + needs: test runs-on: ubuntu-latest - outputs: - version: ${{ steps.version.outputs.version }} steps: - name: Checkout uses: actions/checkout@v7 - name: Read VERSION id: version - run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" + run: cat VERSION >> "$GITHUB_OUTPUT" - build: - name: "Build" - needs: ["test", "version"] - strategy: - fail-fast: false - matrix: - tag: ["latest", "${{ needs.version.outputs.version }}"] - if: github.ref == 'refs/heads/master' - uses: dockette/.github/.github/workflows/docker.yml@master - secrets: inherit - with: - image: "dockette/pound" - tag: ${{ matrix.tag }} - context: "." + - name: Set up QEMU + uses: docker/setup-qemu-action@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + + - name: Login to DockerHub + if: github.ref == 'refs/heads/master' + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v7 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: ${{ github.ref == 'refs/heads/master' }} + tags: | + dockette/pound:latest + dockette/pound:${{ steps.version.outputs.VERSION }} + cache-from: type=gha + cache-to: type=gha,mode=max release: name: "Release" @@ -78,11 +87,13 @@ jobs: - name: Create release env: GH_TOKEN: ${{ github.token }} - run: gh release view "$(cat VERSION)" || gh release create "$(cat VERSION)" --generate-notes + run: | + . ./VERSION + gh release view "$VERSION" || gh release create "$VERSION" --generate-notes docs: name: "Docs" - needs: ["build"] + needs: build if: github.ref == 'refs/heads/master' uses: dockette/.github/.github/workflows/dockerhub-description.yml@master secrets: inherit diff --git a/AGENTS.md b/AGENTS.md index 463c6ea..35948b0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,14 +10,14 @@ Dockette Pound builds `dockette/pound`, a legacy Pound HTTP/HTTPS reverse proxy - Build context: repository root `.` with `Dockerfile` and `pound/pound.cfg`. - Base image: `debian:trixie-slim`. - The image installs the Debian Trixie `pound` package and starts `pound -f /etc/pound/config.cfg`. -- GitHub Actions builds `linux/amd64` for tests, then publishes `linux/amd64,linux/arm64` through the shared Dockette Docker workflow on `master` and the weekly schedule. +- GitHub Actions builds `linux/amd64` for tests, then publishes `linux/amd64,linux/arm64` in one build job on `master` and the weekly schedule; other branches only build. ## Commands - `make build` builds `${DOCKER_IMAGE}:${DOCKER_TAG}` from `.`. - `make test` runs `pound -V` and validates `/etc/pound/config.cfg` with `pound -c -f` inside the built image. - `make run` starts the image locally with `80:80` published. -- `VERSION` is the release date; `make release` bumps it. CI pushes `latest` also as `` and creates the GitHub release. +- `VERSION` is a key=value file with the release date (`VERSION=...`); `make release` sets today's date. CI pushes `latest` also as `` and creates the GitHub release. ## Testing Notes diff --git a/Makefile b/Makefile index 40caa8f..df24ffc 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ DOCKER_IMAGE=dockette/pound DOCKER_TAG?=latest -VERSION:=$(shell cat VERSION) + +include VERSION .PHONY: build build: @@ -21,6 +22,5 @@ version: .PHONY: release release: - @date -u +%Y.%m.%d > VERSION - @echo "VERSION: ${VERSION} -> $$(cat VERSION)" - @echo "next: git commit -am \"Release: $$(cat VERSION)\" && git push" + @sed -i.bak "s/^VERSION=.*/VERSION=$$(date -u +%Y.%m.%d)/" VERSION && rm VERSION.bak + @cat VERSION diff --git a/README.md b/README.md index b548f68..425b6e4 100644 --- a/README.md +++ b/README.md @@ -13,50 +13,45 @@ ----- -## Usage - -```bash -docker run --rm -it \ - -p 80:80 \ - dockette/pound:latest -``` +Legacy image, kept close to the original setup. It uses the official `debian:trixie-slim` base image and the Debian +Trixie `pound` package, so changes stay focused on keeping the image buildable and testable. -The image starts Pound in the foreground with `/etc/pound/config.cfg`. +## Features -## Configuration +- Pound from the Debian Trixie package on `debian:trixie-slim` +- Starts Pound in the foreground with `/etc/pound/config.cfg` +- Bundled configuration listens on port `80` and forwards requests with host headers matching `*.local.dev` to backend + host `app` on port `80` -The bundled configuration listens on port `80` and forwards requests with host headers matching `*.local.dev` to backend host `app` on port `80`. +## Usage -To use your own configuration: +```sh +docker run --rm -it -p 80:80 dockette/pound:latest -```bash -docker run --rm -it \ - -p 80:80 \ - -v "$(pwd)/pound.cfg:/etc/pound/config.cfg:ro" \ - dockette/pound:latest +# use your own configuration +docker run --rm -it -p 80:80 -v "$(pwd)/pound.cfg:/etc/pound/config.cfg:ro" dockette/pound:latest ``` -## Legacy Constraints - -This image is intentionally kept close to the original legacy setup. It uses the official `debian:trixie-slim` base image and Debian Trixie `pound` package, so changes should stay focused on keeping the existing image buildable and testable. - ## Versions -The release version is the date in [`VERSION`](VERSION). CI pushes `latest` also as `dockette/pound:`. -To release, run `make release`, commit and push to `master`. +| Version | Release | +|---------|---------| +| `dockette/pound:YYYY.MM.DD` | release `YYYY.MM.DD` | +| `dockette/pound:latest` | latest build of `master` | -## Development +Releases are listed on [GitHub](https://github.com/dockette/pound/releases). -Build a local image before running tests or starting the container: +## Development -```bash -make build -make test -make run -make version -make release +```sh +make build # build the image +make test # check pound -V and the bundled config +make run # run Pound on port 80 +make version # print VERSION +make release # set today's date in VERSION ``` ## Maintenance -See [how to contribute](https://github.com/dockette/.github/blob/master/CONTRIBUTING.md) to this package. Consider to [support](https://github.com/sponsors/f3l1x) **f3l1x**. Thank you for using this package. +See [how to contribute](https://github.com/dockette/.github/blob/master/CONTRIBUTING.md) to this package. Consider to +[support](https://github.com/sponsors/f3l1x) **f3l1x**. Thank you for using this package. diff --git a/VERSION b/VERSION index 7387f12..c353908 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2026.10.23 +VERSION=2026.10.23