diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 56f36f3..bb49204 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -184,6 +184,10 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 + - name: Read VERSION + id: version + run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" + - name: Login to DockerHub if: github.event_name == 'push' && github.ref == 'refs/heads/master' uses: docker/login-action@v4.6.0 @@ -197,11 +201,29 @@ jobs: context: ${{ matrix.context }} file: ${{ matrix.dockerfile }} push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - tags: dockette/adminer:${{ matrix.tag }} + tags: | + dockette/adminer:${{ matrix.tag }} + ${{ matrix.tag == 'latest' && format('dockette/adminer:{0}', steps.version.outputs.version) || '' }} platforms: ${{ matrix.platforms }} cache-from: type=gha cache-to: type=gha,mode=max + 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/Makefile b/Makefile index 493ea19..86e5668 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ DOCKER_IMAGE=dockette/adminer DOCKER_PLATFORMS?=linux/amd64 DOCKER_RUN_PORT?=8000 DOCKER_RUN_TAG?=full +VERSION:=$(shell cat VERSION) build: build-all @@ -62,3 +63,13 @@ run-oracle-19: _docker-run-oracle-19 update-versions: find . -type f -name Dockerfile -exec sed -i '' 's/ENV ADMINER_VERSION=.*/ENV ADMINER_VERSION=${ADMINER_VERSION}/g' {} + find . -type f -name Dockerfile -exec sed -i '' 's/ENV ADMINER_EDITOR_VERSION=.*/ENV ADMINER_EDITOR_VERSION=${ADMINER_VERSION}/g' {} + + +.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 d4c799f..3cf7834 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,11 @@ If the specified theme is not found, the container will list all available theme ADMINER_VERSION=4.8.1 make update-versions ``` +## Release version + +The release version is the date in [`VERSION`](VERSION). CI pushes `latest` also as `dockette/adminer:`. +To release, run `make release`, commit and push to `master`. + ## 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. diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..7387f12 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +2026.10.23