fix(ci): add docker build template
This commit is contained in:
@@ -2,6 +2,10 @@ name: build-docker-image
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
registry:
|
||||
type: string
|
||||
required: true
|
||||
secrets:
|
||||
registry-user:
|
||||
required: true
|
||||
@@ -25,7 +29,7 @@ jobs:
|
||||
- name: Login in Private Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.palkoi.net
|
||||
registry: ${{ inputs.registry }}
|
||||
username: ${{ secrets.registry-user }}
|
||||
password: ${{ secrets.registry-password }}
|
||||
- name: Build and push
|
||||
@@ -33,7 +37,5 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
cache-from: type=registry,ref=git.palkoi.net/${{ env.GITHUB_REPOSITORY }},mode=max
|
||||
cache-to: type=registry,ref=git.palkoi.net/${{ env.GITHUB_REPOSITORY }},mode=max
|
||||
push: true
|
||||
tags: git.palkoi.net/${{ env.GITHUB_REPOSITORY }}:latest, git.palkoi.net/${{ env.GITHUB_REPOSITORY }}:${{ env.GITHUB_REF_NAME }}-${{ env.GITHUB_RUN_ID }}
|
||||
tags: ${{ inputs.registry }}/${{ env.GITHUB_REPOSITORY }}:latest, ${{ inputs.registry }}/${{ env.GITHUB_REPOSITORY }}:${{ env.GITHUB_REF_NAME }}-${{ env.GITHUB_RUN_ID }}
|
||||
|
||||
Reference in New Issue
Block a user