6
0

Checks for arguemtns

This commit is contained in:
Jon Michael Aanes 2024-02-04 20:56:48 +01:00
parent ffaf0b23e9
commit a2437b318e

View File

@ -56,6 +56,25 @@ jobs:
fi fi
- run: apt-get update - 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.<id>.secrets.DOCKER_USERNAME"
exit 1
fi
if [[ -z "${{ secrets.PIPELINE_WORKER_SSH_KEY }}" ]]; then
echo "Must provide: jobs.<id>.secrets.PIPELINE_WORKER_SSH_KEY"
exit 1
fi
if [[ -z "${{ secrets.PIPELINE_WORKER_KNOWN_HOSTS }}" ]]; then
echo "Must provide: jobs.<id>.secrets.PIPELINE_WORKER_KNOWN_HOSTS"
exit 1
fi
- name: Setting up SSH - name: Setting up SSH
if: ${{ hashFiles('requirements_private.txt') != '' }} if: ${{ hashFiles('requirements_private.txt') != '' }}
uses: https://github.com/shimataro/ssh-key-action@v2.5.1 uses: https://github.com/shimataro/ssh-key-action@v2.5.1
@ -68,9 +87,6 @@ jobs:
HostName gitfub.space HostName gitfub.space
User ${{ secrets.DOCKER_USERNAME }} User ${{ secrets.DOCKER_USERNAME }}
- name: Checkout
uses: actions/checkout@v3
- name: Download private dependencies - name: Download private dependencies
if: ${{ hashFiles('requirements_private.txt') != '' }} if: ${{ hashFiles('requirements_private.txt') != '' }}
run: | run: |