Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdd8c6f245 | ||
|
|
6f5ab6737c | ||
|
|
915730c5e6 |
@@ -30,15 +30,13 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: slim
|
||||
runs-on: test-runner
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
if: ${{ inputs.checkout == 'true' }}
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- name: Copy Git Credentials
|
||||
run: cat /tmp/git-credentials* >> .git/config
|
||||
- name: Bump version and push tag
|
||||
id: tag
|
||||
if: ${{ inputs.tag == 'true' }}
|
||||
@@ -50,6 +48,7 @@ jobs:
|
||||
WITH_V: true
|
||||
PRERELEASE: true
|
||||
PRERELEASE_SUFFIX: ${{ github.ref_name }}
|
||||
verbose: true
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
|
||||
@@ -64,13 +63,13 @@ 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@97740da6c51c4bcd68c7519e2179e6a93389b027 # v1.71.0
|
||||
- uses: int128/docker-build-cache-config-action@8e8b3ba8f4b330eb0e3deedf1d7893ecec5824e5 # v1.65.0
|
||||
id: cache
|
||||
with:
|
||||
image: ${{ inputs.cache-registry }}/${{ inputs.image_name }}-cache
|
||||
extra-cache-to: image-manifest=true
|
||||
- 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 }}
|
||||
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||
with:
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
- 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' -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
|
||||
if: github.ref == 'refs/heads/main'
|
||||
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
|
||||
|
||||
+2
-4
@@ -32,8 +32,6 @@ runs:
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- name: Copy Git Credentials
|
||||
run: cat /tmp/git-credentials* >> .git/config
|
||||
- name: Bump version and push tag
|
||||
id: tag
|
||||
if: ${{ inputs.tag == 'true' }}
|
||||
@@ -59,13 +57,13 @@ 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@97740da6c51c4bcd68c7519e2179e6a93389b027 # v1.71.0
|
||||
- uses: int128/docker-build-cache-config-action@8e8b3ba8f4b330eb0e3deedf1d7893ecec5824e5 # v1.65.0
|
||||
id: cache
|
||||
with:
|
||||
image: ${{ inputs.cache-registry }}/${{ inputs.image_name }}-cache
|
||||
extra-cache-to: image-manifest=true
|
||||
- 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 }}
|
||||
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user