Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be95ef5b18 | ||
|
|
7b5294dc98 | ||
|
|
9519ff5cb0 | ||
|
|
ffec9c4298 | ||
|
|
b987ab54db | ||
|
|
ae5b4afac9 | ||
|
|
00f7aac8ab |
@@ -1,17 +1,14 @@
|
||||
name: 'Tag Build and Push Docker image'
|
||||
description: 'Tags version in current repo, builds docker image and pushes it to registry'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
registry: # id of input
|
||||
description: 'docker regisry host name'
|
||||
required: true
|
||||
type: string
|
||||
default: 'gitea.phadric.de'
|
||||
cache-registry: # id of input
|
||||
description: 'docker regisry host name'
|
||||
required: true
|
||||
default: 'imagecache.phadric.de'
|
||||
type: string
|
||||
image_name:
|
||||
@@ -37,7 +34,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
if: ${{ inputs.checkout == 'true' }}
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- name: Bump version and push tag
|
||||
@@ -65,7 +62,7 @@ jobs:
|
||||
# disabled if major zero
|
||||
type=semver,pattern={{major}},value=${{steps.tag.outputs.tag}},enable=${{ !startsWith(steps.tag.outputs.tag, 'v0.') }}
|
||||
images: ${{ inputs.registry }}/${{ inputs.image_name }}
|
||||
- uses: int128/docker-build-cache-config-action@6b41b75cecc2e81696c50ae7c6c0300b51c2bee1 # v1.62.0
|
||||
- uses: int128/docker-build-cache-config-action@d1b27ffbf29fb93b7239130db030c702198fd52b # v1.64.0
|
||||
id: cache
|
||||
with:
|
||||
image: ${{ inputs.cache-registry }}/${{ inputs.image_name }}-cache
|
||||
|
||||
@@ -17,9 +17,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
- name: Verify Action
|
||||
run: actionlint -ignore 'unexpected key "description" for "workflow" section' -ignore 'nexpected key "inputs" for "workflow" section.' -ignore 'unexpected key "runs" for "workflow" section.' -ignore '"on" section is missing in workflow' -ignore '"jobs" section is missing in workflow' action.yml
|
||||
- name: Verify Workflow
|
||||
run: actionlint -ignore 'label "slim" is unknown' .github/workflows/docker-build.yml
|
||||
- name: tag latest after success
|
||||
if: github.ref == 'refs/heads/main'
|
||||
id: tag
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ runs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
if: ${{ inputs.checkout == 'true' }}
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- name: Bump version and push tag
|
||||
@@ -57,7 +57,7 @@ runs:
|
||||
# disabled if major zero
|
||||
type=semver,pattern={{major}},value=${{steps.tag.outputs.tag}},enable=${{ !startsWith(steps.tag.outputs.tag, 'v0.') }}
|
||||
images: ${{ inputs.registry }}/${{ inputs.image_name }}
|
||||
- uses: int128/docker-build-cache-config-action@6b41b75cecc2e81696c50ae7c6c0300b51c2bee1 # v1.62.0
|
||||
- uses: int128/docker-build-cache-config-action@d1b27ffbf29fb93b7239130db030c702198fd52b # v1.64.0
|
||||
id: cache
|
||||
with:
|
||||
image: ${{ inputs.cache-registry }}/${{ inputs.image_name }}-cache
|
||||
|
||||
Reference in New Issue
Block a user