Compare commits
9
Commits
52636a1630
...
lint
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fb3056ecd | ||
|
|
eaaf42fb64 | ||
|
|
013107eece | ||
|
|
9b1839b144 | ||
|
|
cab1e1921f | ||
|
|
ef4d89d896 | ||
|
|
863ec9d533 | ||
|
|
ec75d04e07 | ||
|
|
febb03c381 |
@@ -1,35 +1,36 @@
|
||||
name: 'Tag Build and Push Docker image'
|
||||
description: 'Tags version in current repo, builds docker image and pushes it to registry'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
registry: # id of input
|
||||
description: 'docker regisry host name'
|
||||
required: true
|
||||
type: string
|
||||
default: 'gitea.phadric.de'
|
||||
cache-registry: # id of input
|
||||
description: 'docker regisry host name'
|
||||
required: true
|
||||
default: 'imagecache.phadric.de'
|
||||
type: string
|
||||
image_name:
|
||||
description: 'name of the dockerimage'
|
||||
required: true
|
||||
default: ${{ github.repository }}
|
||||
type: string
|
||||
checkout:
|
||||
description: 'checkout repo first'
|
||||
default: 'true'
|
||||
type: string
|
||||
tag:
|
||||
description: 'checkout repo first'
|
||||
default: 'true'
|
||||
secrets:
|
||||
TOKEN:
|
||||
description: 'repo auth token'
|
||||
required: true
|
||||
type: string
|
||||
# secrets:
|
||||
# TOKEN:
|
||||
# description: 'repo auth token'
|
||||
# required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: slim
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
if: ${{ inputs.checkout == 'true' }}
|
||||
@@ -39,7 +40,7 @@ jobs:
|
||||
- name: Bump version and push tag
|
||||
id: tag
|
||||
if: ${{ inputs.tag == 'true' }}
|
||||
uses: phadric/github-tag-action@a5250a59655e9f4b0350407380a92c73948f2aec # master
|
||||
uses: anothrNick/github-tag-action@4ed44965e0db8dab2b466a16da04aec3cc312fd8 # 1.75.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
|
||||
DEFAULT_BUMP: patch
|
||||
|
||||
@@ -20,6 +20,8 @@ jobs:
|
||||
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: Verify Workflow
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user