15 Commits

Author SHA1 Message Date
e60c192d19 Merge pull request 'Update docker/metadata-action action to v5.10.0 #none minor (main)' (#24) from renovate-main-github-actions into main
All checks were successful
Actionlint / build (push) Successful in 22s
2025-11-27 15:06:52 +02:00
ba772d1f9d Update docker/metadata-action action to v5.10.0 #none minor
All checks were successful
Actionlint / build (push) Successful in 20s
2025-11-27 13:06:49 +00:00
1088e4e28d Update actions/checkout action to v4.3.1 #none patch
All checks were successful
Actionlint / build (push) Successful in 21s
2025-11-17 17:06:40 +00:00
274045e6d9 Merge pull request 'Update docker/metadata-action action to v5.9.0 #none minor (main)' (#23) from renovate-main-github-actions into main
All checks were successful
Actionlint / build (push) Successful in 21s
2025-11-04 18:06:57 +02:00
cfbfb07a1f Update docker/metadata-action action to v5.9.0 #none minor
All checks were successful
Actionlint / build (push) Successful in 20s
2025-11-04 16:06:54 +00:00
36c7ccf6c6 Merge pull request 'Update int128/docker-build-cache-config-action action to v1.40.0 #none minor' (#21) from renovate-github-actions into main
All checks were successful
Actionlint / build (push) Successful in 22s
2025-10-18 08:06:39 +03:00
1dfa01616b Update int128/docker-build-cache-config-action action to v1.40.0 #none minor
All checks were successful
Actionlint / build (push) Successful in 19s
2025-10-18 05:06:36 +00:00
c353e88228 revert 101ec77574
All checks were successful
Actionlint / build (push) Successful in 26s
revert Update action.yml
2025-10-10 15:45:12 +03:00
101ec77574 Update action.yml
All checks were successful
Actionlint / build (push) Successful in 53s
2025-10-10 15:26:30 +03:00
2085bb5404 Update action.yml
All checks were successful
Actionlint / build (push) Successful in 21s
2025-10-02 16:36:30 +03:00
4ad0f27344 Update action.yml
All checks were successful
Actionlint / build (push) Successful in 21s
2025-10-02 16:33:48 +03:00
579ebf6345 Merge pull request 'Update docker/login-action action to v3.6.0 #none minor' (#20) from renovate-github-actions into main
All checks were successful
Actionlint / build (push) Successful in 20s
2025-09-29 14:06:44 +03:00
c3d97a54a3 Update docker/login-action action to v3.6.0 #none minor
All checks were successful
Actionlint / build (push) Successful in 20s
2025-09-29 11:06:41 +00:00
1e7ef5dfa5 Merge pull request 'Update int128/docker-build-cache-config-action action to v1.39.0 #none minor' (#19) from renovate-github-actions into main
All checks were successful
Actionlint / build (push) Successful in 20s
2025-09-27 04:06:57 +03:00
32061d32c7 Update int128/docker-build-cache-config-action action to v1.39.0 #none minor
All checks were successful
Actionlint / build (push) Successful in 19s
2025-09-27 01:06:55 +00:00
2 changed files with 35 additions and 58 deletions

View File

@@ -17,7 +17,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- 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: tag latest after success

View File

@@ -1,41 +1,40 @@
name: Docker Build
on:
workflow_call:
inputs:
registry: # id of input
description: 'docker regisry host name'
required: true
default: 'gitea.phadric.de'
cache-registry: # id of input
description: 'docker regisry host name'
required: true
default: 'imagecache.phadric.de'
image_name:
description: 'name of the dockerimage'
required: true
default: ${{ github.repository }}
token:
description: 'repo auth token'
required: true
name: 'Tag Build and Push Docker image'
description: 'Tags verion in current repo, builds docker image and pushes it to registry'
inputs:
registry: # id of input
description: 'docker regisry host name'
required: true
default: 'gitea.phadric.de'
cache-registry: # id of input
description: 'docker regisry host name'
required: true
default: 'imagecache.phadric.de'
image_name:
description: 'name of the dockerimage'
required: true
default: ${{ github.repository }}
token:
description: 'repo auth token'
required: true
checkout:
description: 'checkout repo first'
default: 'true'
tag:
description: 'checkout repo first'
default: 'true'
jobs:
build:
runs-on: slim
steps:
- run: echo "::group::Checkout repository"
if: ${{ always() }}
runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
if: ${{ inputs.checkout == 'true' }}
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: '0'
- run: echo "::endgroup::"
if: ${{ always() }}
- run: echo "::group::Bump version and push tag"
if: ${{ always() }}
- name: Bump version and push tag
id: tag
if: ${{ inputs.tag == 'true' }}
uses: phadric/github-tag-action@a5250a59655e9f4b0350407380a92c73948f2aec # master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
@@ -44,13 +43,9 @@ jobs:
WITH_V: true
PRERELEASE: true
PRERELEASE_SUFFIX: ${{ github.ref_name }}
- run: echo "::endgroup::"
if: ${{ always() }}
- run: echo "::group::Extract Docker metadata"
if: ${{ always() }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
flavor: |
latest=${{ github.ref_name == 'main' || github.ref_name == 'master' }}
@@ -62,35 +57,19 @@ 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 }}
- run: echo "::endgroup::"
if: ${{ always() }}
- run: echo "::group::Configure build Cache"
if: ${{ always() }}
- uses: int128/docker-build-cache-config-action@338206c80bf9eeb2b9694b7b4fc8c247c317e2a8 # v1.38.0
- uses: int128/docker-build-cache-config-action@fb186e80c08f14a2e56ed9105d4594562bff013f # v1.40.0
id: cache
with:
image: ${{ inputs.cache-registry }}/${{ inputs.image_name }}-cache
extra-cache-to: image-manifest=true
- run: echo "::endgroup::"
if: ${{ always() }}
- run: echo "::group::Setup Buildx"
if: ${{ always() }}
- name: Setup Docker buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- run: echo "::endgroup::"
if: ${{ always() }}
- run: echo "::group::Log into Registry ${{ inputs.registry }}"
if: ${{ always() }}
- name: Log into registry ${{ inputs.registry }}
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ${{ inputs.registry }}
username: ${{ github.actor }}
password: ${{ inputs.token }}
- run: echo "::endgroup::"
if: ${{ always() }}
- run: echo "::group::Build and Push docker image"
if: ${{ always() }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
@@ -107,5 +86,3 @@ jobs:
cache-to: |
${{ steps.cache.outputs.cache-to }}
type=registry,ref=${{ inputs.cache-registry }}/${{ inputs.image_name }}-cache:latest,mode=max,image-manifest=true
- run: echo "::endgroup::"
if: ${{ always() }}