mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 12:49:43 +02:00
feat: Set labels when building docker image
This commit is contained in:
parent
a69270eeef
commit
8ef27ca32a
3 changed files with 17 additions and 6 deletions
|
@ -40,5 +40,5 @@ jobs:
|
|||
build-args: ALPINE_VERSION=${{ env.ALPINE_VERSION }}
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/plankanban/planka:base-latest
|
||||
ghcr.io/plankanban/planka:base-${{ env.ALPINE_VERSION }}
|
||||
ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:base-latest
|
||||
ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:base-${{ env.ALPINE_VERSION }}
|
||||
|
|
|
@ -11,7 +11,7 @@ on:
|
|||
branches: [master]
|
||||
|
||||
env:
|
||||
REGISTRY_IMAGE: ghcr.io/plankanban/planka
|
||||
REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
|
@ -31,12 +31,23 @@ jobs:
|
|||
result-encoding: string
|
||||
script: return context.payload.release.tag_name.replace('v', '')
|
||||
|
||||
- name: Generate docker image tags
|
||||
id: metadata
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
name=ghcr.io/${{ github.repository_owner }}/${{ github.repository }}
|
||||
tags: |
|
||||
type=raw,value=${{ steps.set-version.outputs.result }}
|
||||
type=raw,value=latest
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/plankanban/planka:latest
|
||||
ghcr.io/plankanban/planka:${{ steps.set-version.outputs.result }}
|
||||
tags: ${{ steps.metadata.outputs.tags }}
|
||||
labels: ${{ steps.metadata.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue