From 4142f5c3b1cf1d28a7f727cc361414199f53a14a Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Tue, 5 Dec 2023 15:12:54 +0100 Subject: [PATCH] Strict container workflow --- .gitea/workflows/container.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index 22f0224..d62c267 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -6,20 +6,25 @@ on: DOCKER_REG_DOMAIN: description: Domain of the Gitea instance used as registry. required: true + type: string default: gitfub.space DOCKER_ORG: description: Gitea organization or user to use as registry. required: true + type: string DOCKER_LATEST: required: false + type: string default: latest secrets: DOCKER_USERNAME: description: User to upload built container as. required: true + type: string DOCKER_PASSWORD: description: Password (or auth token) to upload built container as. required: true + type: string jobs: release-image: @@ -29,6 +34,21 @@ jobs: env: RUNNER_TOOL_CACHE: /toolcache steps: + - name: Check inputs + run: | + if [[ -z "${{ DOCKER_REG_DOMAIN }}" ]]; then + echo "Must provide: jobs..with.DOCKER_REG_DOMAIN" + exit 1 + fi + if [[ -z "${{ DOCKER_ORG }}" ]]; then + echo "Must provide: jobs..with.DOCKER_ORG" + exit 1 + fi + if [[ -z "${{ DOCKER_LATEST }}" ]]; then + echo "Must provide: jobs..with.DOCKER_LATEST" + exit 1 + fi + - name: Checkout uses: actions/checkout@v3