Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a65ceb015 | ||
|
|
81746f4b26 |
63
.github/workflows/publish-image.yml
vendored
63
.github/workflows/publish-image.yml
vendored
@@ -3,16 +3,19 @@ name: publish-image
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
- "v*.*.*"
|
||||
|
||||
workflow_run:
|
||||
workflows: ["Stable Tag"] # MUST match stable-tag.yml -> name: Stable Tag
|
||||
types: [completed]
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
uses: ./.github/workflows/reusable-test.yml
|
||||
|
||||
build-and-push:
|
||||
needs: tests
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
(github.event_name == 'push') ||
|
||||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
@@ -20,6 +23,10 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# push: checks out the tag ref
|
||||
# workflow_run: checks out the exact commit that the Stable Tag workflow ran on
|
||||
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.ref }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
@@ -27,20 +34,6 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Extract tag
|
||||
id: meta
|
||||
run: |
|
||||
echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Check semver tag
|
||||
id: semver
|
||||
run: |
|
||||
if [[ "${GITHUB_REF_NAME}" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "is_semver=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "is_semver=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -48,27 +41,27 @@ jobs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push (tag)
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:${{ steps.meta.outputs.tag }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
- name: Compute tags
|
||||
id: meta
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
IMAGE="ghcr.io/${{ github.repository }}"
|
||||
|
||||
- name: Build and push (latest)
|
||||
if: steps.semver.outputs.is_semver == 'true'
|
||||
if [ "${{ github.event_name }}" = "push" ]; then
|
||||
TAG="${{ github.ref_name }}" # e.g. v1.1.0
|
||||
echo "tags=$IMAGE:$TAG,$IMAGE:latest" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "tags=$IMAGE:stable" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
## [1.1.1] - 2025-12-24
|
||||
|
||||
* Improved Docker image publishing: automatic `vX.Y.Z`, `latest`, and `stable` tags for releases.
|
||||
|
||||
|
||||
## [1.1.0] - 2025-12-23
|
||||
|
||||
* Implemented bootstrap docker image to auto install matomo in docker compose
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
rec {
|
||||
matomo-bootstrap = python.pkgs.buildPythonApplication {
|
||||
pname = "matomo-bootstrap";
|
||||
version = "1.1.0"; # keep in sync with pyproject.toml
|
||||
version = "1.1.1"; # keep in sync with pyproject.toml
|
||||
pyproject = true;
|
||||
src = self;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "matomo-bootstrap"
|
||||
version = "1.1.0"
|
||||
version = "1.1.1"
|
||||
description = "Headless bootstrap tooling for Matomo (installation + API token provisioning)"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
Reference in New Issue
Block a user