From a2437b318ea29806c69d3979877cab01deb133fc Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Sun, 4 Feb 2024 20:56:48 +0100 Subject: [PATCH] Checks for arguemtns --- .gitea/workflows/container.yaml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index 7c254d5..5b7f6b6 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -56,6 +56,25 @@ jobs: fi - run: apt-get update + - name: Checkout + uses: actions/checkout@v3 + + - name: Check inputs for ssh + if: ${{ hashFiles('requirements_private.txt') != '' }} + run: | + if [[ -z "${{ secrets.DOCKER_USERNAME }}" ]]; then + echo "Must provide: jobs..secrets.DOCKER_USERNAME" + exit 1 + fi + if [[ -z "${{ secrets.PIPELINE_WORKER_SSH_KEY }}" ]]; then + echo "Must provide: jobs..secrets.PIPELINE_WORKER_SSH_KEY" + exit 1 + fi + if [[ -z "${{ secrets.PIPELINE_WORKER_KNOWN_HOSTS }}" ]]; then + echo "Must provide: jobs..secrets.PIPELINE_WORKER_KNOWN_HOSTS" + exit 1 + fi + - name: Setting up SSH if: ${{ hashFiles('requirements_private.txt') != '' }} uses: https://github.com/shimataro/ssh-key-action@v2.5.1 @@ -68,9 +87,6 @@ jobs: HostName gitfub.space User ${{ secrets.DOCKER_USERNAME }} - - name: Checkout - uses: actions/checkout@v3 - - name: Download private dependencies if: ${{ hashFiles('requirements_private.txt') != '' }} run: |