Publish and tag docker on a new version release
This commit is contained in:
14
.github/workflows/docker-publish.yml
vendored
14
.github/workflows/docker-publish.yml
vendored
@@ -1,8 +1,10 @@
|
|||||||
name: Docker
|
name: Docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
branches: main
|
types: [created]
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-image:
|
build-and-push-image:
|
||||||
@@ -14,6 +16,10 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Extract Version Number
|
||||||
|
id: extract_version
|
||||||
|
run: echo "::set-output name=version::${{ github.ref | replace('refs/tags/v', '') }}"
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
@@ -34,4 +40,6 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/mrsked/mrsk:latest
|
tags: |
|
||||||
|
ghcr.io/mrsked/mrsk:latest
|
||||||
|
ghcr.io/mrsked/mrsk:${{ steps.extract_version.outputs.version }}
|
||||||
|
|||||||
Reference in New Issue
Block a user