Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdd8c6f245 | ||
|
|
6f5ab6737c | ||
|
|
915730c5e6 |
@@ -30,15 +30,13 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: slim
|
runs-on: test-runner
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
if: ${{ inputs.checkout == 'true' }}
|
if: ${{ inputs.checkout == 'true' }}
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
- name: Copy Git Credentials
|
|
||||||
run: cat /tmp/git-credentials* >> .git/config
|
|
||||||
- name: Bump version and push tag
|
- name: Bump version and push tag
|
||||||
id: tag
|
id: tag
|
||||||
if: ${{ inputs.tag == 'true' }}
|
if: ${{ inputs.tag == 'true' }}
|
||||||
@@ -50,6 +48,7 @@ jobs:
|
|||||||
WITH_V: true
|
WITH_V: true
|
||||||
PRERELEASE: true
|
PRERELEASE: true
|
||||||
PRERELEASE_SUFFIX: ${{ github.ref_name }}
|
PRERELEASE_SUFFIX: ${{ github.ref_name }}
|
||||||
|
verbose: true
|
||||||
- name: Extract Docker metadata
|
- name: Extract Docker metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
|
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
|
||||||
@@ -64,13 +63,13 @@ jobs:
|
|||||||
# 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 }}
|
||||||
- uses: int128/docker-build-cache-config-action@97740da6c51c4bcd68c7519e2179e6a93389b027 # v1.71.0
|
- uses: int128/docker-build-cache-config-action@8e8b3ba8f4b330eb0e3deedf1d7893ecec5824e5 # v1.65.0
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
image: ${{ inputs.cache-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
|
||||||
- name: Setup Docker buildx
|
- name: Setup Docker buildx
|
||||||
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
|
||||||
- name: Log into registry ${{ inputs.registry }}
|
- name: Log into registry ${{ inputs.registry }}
|
||||||
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||||
with:
|
with:
|
||||||
@@ -79,7 +78,7 @@ jobs:
|
|||||||
password: ${{ secrets.TOKEN }}
|
password: ${{ secrets.TOKEN }}
|
||||||
- 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@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
- name: Verify Action
|
- 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
|
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
|
- name: Verify Workflow
|
||||||
run: actionlint -ignore 'label "slim" is unknown' -ignore 'label "test-runner" is unknown' .github/workflows/*.yml
|
run: actionlint -ignore 'label "slim" is unknown' .github/workflows/docker-build.yml
|
||||||
- name: tag latest after success
|
- name: tag latest after success
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
id: tag
|
id: tag
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
name: VerifyCompose
|
|
||||||
|
|
||||||
# This workflow uses actions that are not certified by GitHub.
|
|
||||||
# They are provided by a third-party and are governed by
|
|
||||||
# separate terms of service, privacy policy, and support
|
|
||||||
# documentation.
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
ref: # id of input
|
|
||||||
description: 'ref to tag e.g. refs/heads/main'
|
|
||||||
type: string
|
|
||||||
default: 'refs/heads/main'
|
|
||||||
tagname: # id of input
|
|
||||||
description: 'tag name (default: latest)'
|
|
||||||
default: 'latest'
|
|
||||||
type: string
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: slim
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
- name: Verify Compose File
|
|
||||||
run: docker compose config -q
|
|
||||||
- name: tag latest after success
|
|
||||||
if: ${{ github.ref == inputs.ref }}
|
|
||||||
id: tag
|
|
||||||
run: |
|
|
||||||
git tag -f ${{ inputs.tagname }}
|
|
||||||
git push --tags -f
|
|
||||||
|
|
||||||
+3
-5
@@ -32,8 +32,6 @@ runs:
|
|||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
- name: Copy Git Credentials
|
|
||||||
run: cat /tmp/git-credentials* >> .git/config
|
|
||||||
- name: Bump version and push tag
|
- name: Bump version and push tag
|
||||||
id: tag
|
id: tag
|
||||||
if: ${{ inputs.tag == 'true' }}
|
if: ${{ inputs.tag == 'true' }}
|
||||||
@@ -59,13 +57,13 @@ 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 }}
|
||||||
- uses: int128/docker-build-cache-config-action@97740da6c51c4bcd68c7519e2179e6a93389b027 # v1.71.0
|
- uses: int128/docker-build-cache-config-action@8e8b3ba8f4b330eb0e3deedf1d7893ecec5824e5 # v1.65.0
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
image: ${{ inputs.cache-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
|
||||||
- name: Setup Docker buildx
|
- name: Setup Docker buildx
|
||||||
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
|
||||||
- name: Log into registry ${{ inputs.registry }}
|
- name: Log into registry ${{ inputs.registry }}
|
||||||
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||||
with:
|
with:
|
||||||
@@ -74,7 +72,7 @@ runs:
|
|||||||
password: ${{ inputs.token }}
|
password: ${{ inputs.token }}
|
||||||
- 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@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
Reference in New Issue
Block a user