Fix #222 - add major/minor version docker tags
This commit is contained in:
+15
-12
@@ -6,9 +6,6 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
||||||
env:
|
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-image:
|
build-and-push-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -37,7 +34,7 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3.2.0
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -46,7 +43,14 @@ jobs:
|
|||||||
id: metadata
|
id: metadata
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ github.repository }}
|
images: |
|
||||||
|
${{ github.repository }}
|
||||||
|
ghcr.io/${{ github.repository }}
|
||||||
|
tags: |
|
||||||
|
type=semver,pattern={{version}},value=v${{ env.PACKAGE_VERSION }}
|
||||||
|
type=semver,pattern={{major}}.{{minor}},value=v${{ env.PACKAGE_VERSION }}
|
||||||
|
type=semver,pattern={{major}},value=v${{ env.PACKAGE_VERSION }}
|
||||||
|
type=raw,value=latest
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
@@ -54,12 +58,11 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm64/v8
|
platforms: linux/amd64,linux/arm64
|
||||||
build-args: |
|
build-args: |
|
||||||
PACKAGE_VERSION=${{ env.PACKAGE_VERSION }}
|
PACKAGE_VERSION=${{ env.PACKAGE_VERSION }}
|
||||||
tags: |
|
tags: ${{ steps.metadata.outputs.tags }}
|
||||||
${{ github.repository }}:${{ env.PACKAGE_VERSION }}
|
labels: ${{ steps.metadata.outputs.labels }}
|
||||||
${{ github.repository }}:latest
|
annotations: ${{ steps.metadata.outputs.annotations }}
|
||||||
ghcr.io/${{ github.repository }}:${{ env.PACKAGE_VERSION }}
|
cache-from: type=gha
|
||||||
ghcr.io/${{ github.repository }}:latest
|
cache-to: type=gha,mode=max
|
||||||
annotations: ${{ steps.metadata.output.annotations }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user