From 24e6866f2c69b9e1a41df0b72fdd347a1c3ceaa9 Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Sun, 29 Oct 2023 17:20:05 +0000 Subject: [PATCH] Enhancement (ci): Tag release docker images with semver major, minor, and patch patterns --- .github/workflows/ci-master-pr.yml | 8 ++++++-- README.md | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index e76e4708..9d9ca00a 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -105,8 +105,12 @@ jobs: type=ref,suffix=-{{sha}}-${{ matrix.variant }},event=pr type=ref,suffix=-${{ matrix.variant }},event=branch type=ref,suffix=-{{sha}}-${{ matrix.variant }},event=branch - type=ref,suffix=-${{ matrix.variant }},event=tag - type=ref,suffix=-{{sha}}-${{ matrix.variant }},event=tag + type=semver,pattern={{major}},suffix=-${{ matrix.variant }} + type=semver,pattern={{major}},suffix=-{{sha}}-${{ matrix.variant }} + type=semver,pattern={{major}}.{{minor}},suffix=-${{ matrix.variant }} + type=semver,pattern={{major}}.{{minor}},suffix=-{{sha}}-${{ matrix.variant }} + type=semver,pattern={{major}}.{{minor}}.{{patch}},suffix=-${{ matrix.variant }} + type=semver,pattern={{major}}.{{minor}}.{{patch}},suffix=-{{sha}}-${{ matrix.variant }} # Disable 'latest' tag flavor: | latest=false diff --git a/README.md b/README.md index 73427461..1c882e4c 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,14 @@ a PHP frontend. ## Usage +Tag convention: `-` or `--`. For instance, for release `v1.2.3` on sha `0abcdef`: + +- `web` image: `1-web`, `1.2-web`, `1.2.3-web`, `1-0abcdef-web`, `1.2-0abcdef-web`, `1.2.3-0abcdef-web`. +- `daemon` image: `1-daemon`, `1.2-daemon`, `1.2.3-daemon`, `1-0abcdef-daemon`, `1.2-0abcdef-daemon`, `1.2.3-0abcdef-daemon` + ```sh -docker run --rm -it -p 80:80 startersclan/hlstatsx-community-edition:v1.7.0-web -docker run --rm -it -p 27500:27500/udp startersclan/hlstatsx-community-edition:v1.7.0-daemon --help +docker run --rm -it -p 80:80 startersclan/hlstatsx-community-edition:1.7.0-web +docker run --rm -it -p 27500:27500/udp startersclan/hlstatsx-community-edition:1.7.0-daemon --help ``` ## Development