13 Commits

Author SHA1 Message Date
69ee3e8b14 Update .github/workflows/action.yml
Some checks failed
Actionlint / build (push) Failing after 14s
2025-08-25 17:42:40 +03:00
f8643ac173 Update action.yml
Some checks failed
Actionlint / build (push) Failing after 14s
2025-08-25 17:40:48 +03:00
9d6404c2f4 Update action.yml
All checks were successful
Actionlint / build (push) Successful in 11s
2025-08-18 14:06:21 +03:00
e5a635c741 Merge pull request 'Update actions/checkout action to v4.3.0 #none minor' (#17) from renovate-github-actions into main
All checks were successful
Actionlint / build (push) Successful in 13s
2025-08-11 14:07:53 +03:00
e04f237647 Update actions/checkout action to v4.3.0 #none minor
All checks were successful
Actionlint / build (push) Successful in 14s
2025-08-11 11:07:51 +00:00
de2b1bbbac Merge pull request 'Update docker/login-action action to v3.5.0 #none minor' (#16) from renovate-github-actions into main
All checks were successful
Actionlint / build (push) Successful in 6s
2025-08-04 17:06:31 +03:00
a136f6982a Update docker/login-action action to v3.5.0 #none minor 2025-08-04 14:06:30 +00:00
d4c4cd3dfb Merge pull request 'Update docker/metadata-action action to v5.8.0 #none minor' (#15) from renovate-github-actions into main
All checks were successful
Actionlint / build (push) Successful in 13s
2025-08-01 13:07:54 +03:00
683fa5c055 Update docker/metadata-action action to v5.8.0 #none minor
All checks were successful
Actionlint / build (push) Successful in 5s
2025-08-01 10:07:51 +00:00
046a225e7e Update docker/setup-buildx-action action to v3.11.1 #none patch
All checks were successful
Actionlint / build (push) Successful in 24s
2025-06-18 09:08:40 +00:00
e5b46d6385 Update docker/setup-buildx-action action to v3.11.0 #none minor
All checks were successful
Actionlint / build (push) Successful in 21s
2025-06-16 13:08:25 +00:00
69cad58d3f Update docker/build-push-action action to v6.18.0 #none minor
All checks were successful
Actionlint / build (push) Successful in 10s
2025-05-27 17:08:15 +00:00
5195bbca59 Merge pull request 'separate_cache' (#12) from separate_cache into main
All checks were successful
Actionlint / build (push) Successful in 9s
Reviewed-on: #12
2025-05-23 15:37:09 +03:00
2 changed files with 46 additions and 28 deletions

View File

@@ -1,32 +1,39 @@
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
name: Docker Build
runs:
using: "composite"
steps:
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
jobs:
build:
runs-on: slim
steps:
- run: echo "::group::Checkout repository"
if: ${{ always() }}
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
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
uses: phadric/github-tag-action@a5250a59655e9f4b0350407380a92c73948f2aec # master
@@ -38,10 +45,12 @@ runs:
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@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
with:
flavor: |
latest=${{ github.ref_name == 'main' || github.ref_name == 'master' }}
@@ -54,29 +63,37 @@ runs:
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
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@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
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@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.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@1dc73863535b631f98b2378be8619f83b136f4a0 # v6.17.0
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
push: true
@@ -91,3 +108,4 @@ runs:
${{ 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() }}

View File

@@ -17,7 +17,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.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: tag latest after success