Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/varnish"
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"]
Expand Down
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ Dockette Varnish builds `dockette/varnish`, a legacy Varnish Cache image for old
- Place `.PHONY: <target>` directly above each Makefile target.
- Keep README badges and maintenance sections consistent with other Dockette image repos.
- Do not introduce unrelated modernization or runtime behavior changes.
- `VERSION` is the release date; `make release` bumps it. CI pushes `latest` also as `<VERSION>` and creates the GitHub release.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
DOCKER_IMAGE=dockette/varnish
DOCKER_TAG?=latest
DOCKER_PLATFORMS?=linux/amd64,linux/arm64
VERSION:=$(shell cat VERSION)

.PHONY: build
build:
Expand All @@ -18,3 +19,13 @@ run:
docker network create varnish-run >/dev/null 2>&1 || true
docker run --rm -d --name varnish-app --network varnish-run --network-alias app nginx:alpine
docker run --rm -it -p 80:80 --network varnish-run ${DOCKER_IMAGE}:${DOCKER_TAG}; status=$$?; docker stop varnish-app >/dev/null; exit $$status

.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"
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,19 @@ This repository intentionally preserves the historical image behavior. The entry

The CI smoke test focuses on build viability, Varnish version output, entrypoint presence, bundled config presence, and VCL compilation.

## Versions

The release version is the date in [`VERSION`](VERSION). CI pushes `latest` also as `dockette/varnish:<VERSION>`.
To release, run `make release`, commit and push to `master`.

## Development

```bash
make build
make test
make run
make version
make release
```

`make run` starts a temporary backend as `app:80` for the bundled VCL.
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026.10.23
Loading