Commit 0f6d0441 by Moikot

Trigger on `gh-v*.*.*' tags only

parent db65b6ae
...@@ -2,11 +2,8 @@ name: ci ...@@ -2,11 +2,8 @@ name: ci
on: on:
push: push:
branches:
- '**'
tags: tags:
- 'v*.*.*' - 'gh-v*.*.*'
pull_request:
jobs: jobs:
docker: docker:
...@@ -21,7 +18,7 @@ jobs: ...@@ -21,7 +18,7 @@ jobs:
run: | run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/} VERSION=${GITHUB_REF#refs/tags/}
if [[ $VERSION =~ ^v([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$ ]]; then if [[ $VERSION =~ ^gh-v([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$ ]]; then
MAJOR="${BASH_REMATCH[1]}" MAJOR="${BASH_REMATCH[1]}"
MINOR="${BASH_REMATCH[2]}" MINOR="${BASH_REMATCH[2]}"
PATCH="${BASH_REMATCH[3]}" PATCH="${BASH_REMATCH[3]}"
......
...@@ -182,11 +182,7 @@ spec: ...@@ -182,11 +182,7 @@ spec:
# Build and publish with GitHub Actions # Build and publish with GitHub Actions
In a forked repository you can use GitHub Actions pipeline defined in [.github/workflows/release.yml](.github/workflows/release.yml). The pipeline builds Docker images for `linux/amd64`, `linux/arm64`, and `linux/arm/v7` platforms and publishes them using a multi-arch manifest attaching tags according to the next rules: In a forked repository you can use GitHub Actions pipeline defined in [.github/workflows/release.yml](.github/workflows/release.yml). The pipeline builds Docker images for `linux/amd64`, `linux/arm64`, and `linux/arm/v7` platforms and publishes them using a multi-arch manifest. The pipeline is triggered when you add a tag like `gh-v{major}.{minor}.{patch}` to your commit and push it to GitHub. The tag is used for generating Docker image tags: `latest`, `{major}`, `{major}:{minor}`, `{major}:{minor}:{patch}`.
* For the master branch, it uses `:edge` tag and pushes images to the registry.
* For any other branch except master, it uses the branch name as the tag name replacing `/`s with `-`s, and pushes to the registry.
* For any tag matching patter `v{major}.{minor}.{patch}` it creates several tags: `latest`, `{major}`, `{major}:{minor}`, `{major}:{minor}:{patch}` and pushes to the registry. For any other tag, it uses the tag's name as the image tag and pushes too.
* For pull requests, it uses ephemeral `:pr-{github.event.number}` tags, builds the images but doesn't push to the registry.
The pipeline adds several labels: The pipeline adds several labels:
* `org.opencontainers.image.title=${{ github.event.repository.name }}` * `org.opencontainers.image.title=${{ github.event.repository.name }}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment