Compare commits
14 Commits
renovate/c
...
separate_c
| Author | SHA1 | Date | |
|---|---|---|---|
| 5eecde82b3 | |||
| 087e5b576f | |||
| e7cc9a3266 | |||
| 862ae7dd2b | |||
| 95ef39b83c | |||
| 889cffd45b | |||
| f98a84551d | |||
| 776f1b1fd1 | |||
| 356ccabf9c | |||
| 29016b9cf4 | |||
| 7053f2f43b | |||
| 778054feda | |||
| cbe3fdd719 | |||
| 3cc527e684 |
44
action.yml
44
action.yml
@@ -5,6 +5,10 @@ inputs:
|
|||||||
description: 'docker regisry host name'
|
description: 'docker regisry host name'
|
||||||
required: true
|
required: true
|
||||||
default: 'gitea.phadric.de'
|
default: 'gitea.phadric.de'
|
||||||
|
cache-registry: # id of input
|
||||||
|
description: 'docker regisry host name'
|
||||||
|
required: true
|
||||||
|
default: 'imagecache.phadric.de'
|
||||||
image_name:
|
image_name:
|
||||||
description: 'name of the dockerimage'
|
description: 'name of the dockerimage'
|
||||||
required: true
|
required: true
|
||||||
@@ -16,11 +20,13 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
- run: echo "::group::Checkout repository"
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
- run: echo "::endgroup::"
|
||||||
|
- run: echo "::group::Bump version and push tag"
|
||||||
- name: Bump version and push tag
|
- name: Bump version and push tag
|
||||||
id: tag
|
id: tag
|
||||||
uses: phadric/github-tag-action@a5250a59655e9f4b0350407380a92c73948f2aec # master
|
uses: phadric/github-tag-action@a5250a59655e9f4b0350407380a92c73948f2aec # master
|
||||||
@@ -31,10 +37,11 @@ runs:
|
|||||||
WITH_V: true
|
WITH_V: true
|
||||||
PRERELEASE: true
|
PRERELEASE: true
|
||||||
PRERELEASE_SUFFIX: ${{ github.ref_name }}
|
PRERELEASE_SUFFIX: ${{ github.ref_name }}
|
||||||
|
- run: echo "::endgroup::"
|
||||||
|
- run: echo "::group::Extract Docker metadata"
|
||||||
- name: Extract Docker metadata
|
- name: Extract Docker metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
|
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
|
||||||
with:
|
with:
|
||||||
flavor: |
|
flavor: |
|
||||||
latest=${{ github.ref_name == 'main' || github.ref_name == 'master' }}
|
latest=${{ github.ref_name == 'main' || github.ref_name == 'master' }}
|
||||||
@@ -46,26 +53,30 @@ runs:
|
|||||||
# disabled if major zero
|
# disabled if major zero
|
||||||
type=semver,pattern={{major}},value=${{steps.tag.outputs.tag}},enable=${{ !startsWith(steps.tag.outputs.tag, 'v0.') }}
|
type=semver,pattern={{major}},value=${{steps.tag.outputs.tag}},enable=${{ !startsWith(steps.tag.outputs.tag, 'v0.') }}
|
||||||
images: ${{ inputs.registry }}/${{ inputs.image_name }}
|
images: ${{ inputs.registry }}/${{ inputs.image_name }}
|
||||||
|
- run: echo "::endgroup::"
|
||||||
- uses: int128/docker-build-cache-config-action@34bb1b5886d06c161bf0dd9e169f03a52ff858fb # v1.35.0
|
- run: echo "::group::Configure build Cache"
|
||||||
|
- uses: int128/docker-build-cache-config-action@338206c80bf9eeb2b9694b7b4fc8c247c317e2a8 # v1.38.0
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
image: ${{ inputs.registry }}/${{ inputs.image_name }}-cache
|
image: ${{ inputs.cache-registry }}/${{ inputs.image_name }}-cache
|
||||||
extra-cache-to: image-manifest=true
|
extra-cache-to: image-manifest=true
|
||||||
|
- run: echo "::endgroup::"
|
||||||
|
- run: echo "::group::Setup Buildx"
|
||||||
- name: Setup Docker buildx
|
- name: Setup Docker buildx
|
||||||
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
|
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
||||||
|
- run: echo "::endgroup::"
|
||||||
|
- run: echo "::group::Log into Registry ${{ inputs.registry }}"
|
||||||
- name: Log into registry ${{ inputs.registry }}
|
- name: Log into registry ${{ inputs.registry }}
|
||||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
||||||
with:
|
with:
|
||||||
registry: ${{ inputs.registry }}
|
registry: ${{ inputs.registry }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ inputs.token }}
|
password: ${{ inputs.token }}
|
||||||
|
- run: echo "::endgroup::"
|
||||||
|
- run: echo "::group::Build and Push docker image"
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
id: build-and-push
|
id: build-and-push
|
||||||
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
|
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0 # v6.17.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
@@ -73,9 +84,10 @@ runs:
|
|||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: |
|
cache-from: |
|
||||||
type=registry,ref=${{ inputs.registry }}/${{ inputs.image_name }}-cache:latest
|
type=registry,ref=${{ inputs.cache-registry }}/${{ inputs.image_name }}-cache:latest
|
||||||
type=registry,ref=${{ inputs.registry }}/${{ inputs.image_name }}-cache:${{ github.ref_name }}
|
type=registry,ref=${{ inputs.cache-registry }}/${{ inputs.image_name }}-cache:${{ github.ref_name }}
|
||||||
${{ steps.cache.outputs.cache-from }}
|
${{ steps.cache.outputs.cache-from }}
|
||||||
cache-to: |
|
cache-to: |
|
||||||
${{ steps.cache.outputs.cache-to }}
|
${{ steps.cache.outputs.cache-to }}
|
||||||
type=registry,ref=${{ inputs.registry }}/${{ inputs.image_name }}-cache:latest,mode=max,image-manifest=true
|
type=registry,ref=${{ inputs.cache-registry }}/${{ inputs.image_name }}-cache:latest,mode=max,image-manifest=true
|
||||||
|
- run: echo "::endgroup::"
|
||||||
Reference in New Issue
Block a user