6
0

Strict container workflow

This commit is contained in:
Jon Michael Aanes 2023-12-05 15:12:54 +01:00
parent 032a40ef55
commit 4142f5c3b1

View File

@ -6,20 +6,25 @@ on:
DOCKER_REG_DOMAIN: DOCKER_REG_DOMAIN:
description: Domain of the Gitea instance used as registry. description: Domain of the Gitea instance used as registry.
required: true required: true
type: string
default: gitfub.space default: gitfub.space
DOCKER_ORG: DOCKER_ORG:
description: Gitea organization or user to use as registry. description: Gitea organization or user to use as registry.
required: true required: true
type: string
DOCKER_LATEST: DOCKER_LATEST:
required: false required: false
type: string
default: latest default: latest
secrets: secrets:
DOCKER_USERNAME: DOCKER_USERNAME:
description: User to upload built container as. description: User to upload built container as.
required: true required: true
type: string
DOCKER_PASSWORD: DOCKER_PASSWORD:
description: Password (or auth token) to upload built container as. description: Password (or auth token) to upload built container as.
required: true required: true
type: string
jobs: jobs:
release-image: release-image:
@ -29,6 +34,21 @@ jobs:
env: env:
RUNNER_TOOL_CACHE: /toolcache RUNNER_TOOL_CACHE: /toolcache
steps: steps:
- name: Check inputs
run: |
if [[ -z "${{ DOCKER_REG_DOMAIN }}" ]]; then
echo "Must provide: jobs.<id>.with.DOCKER_REG_DOMAIN"
exit 1
fi
if [[ -z "${{ DOCKER_ORG }}" ]]; then
echo "Must provide: jobs.<id>.with.DOCKER_ORG"
exit 1
fi
if [[ -z "${{ DOCKER_LATEST }}" ]]; then
echo "Must provide: jobs.<id>.with.DOCKER_LATEST"
exit 1
fi
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3