Sanitize input

Signed-off-by: Christian Richter <crichter@suse.com>
This commit is contained in:
Christian Richter
2021-09-03 15:04:32 +02:00
parent d9f8f58279
commit 402f890365
2 changed files with 20 additions and 10 deletions

View File

@@ -8,13 +8,15 @@ Supported arches are:
- amd64 - amd64
## Environment variables ## Environment variables
```terminal
| Variable | Values | default |
|------------+----------------------------------------+----------------|
| `TOKEN` | token for runner from github | <unset> |
| `ARCH` | arm, arm64, x64 | x64 |
| `OS` | linux,osx | linux |
| `ORG` | name of the github org | <unset> |
| `REPO` | name of the github repo | <unset> |
| `VERSION` | version of the github runner to user | 2.280.3 |
| `CHECKSUM` | checksum for the github runner version | valid checksum |
```
| Variable | Values | default |
|-------------------------------------------------+----------------------------------------+------------------------------------------------------------------|
| `TOKEN` | token for runner from github | <unset> |
| `ARCH` | arm, arm64, x64 | x64 |
| `OS` | linux,osx | linux |
| `ORG` | name of the github org | <unset> |
| `REPO` | name of the github repo | <unset> |
| `VERSION` version of the github runner to user | 2.280.3 | |
| `CHECKSUM` | checksum for the github runner version | 69dc323312e3c5547ba1e1cc46c127e2ca8ee7d7037e17ee6965ef6dac3c142b |

View File

@@ -6,8 +6,16 @@ ORG=${ORG:-dragonchaser}
REPO=${REPO:-dockerhub-autobuild} REPO=${REPO:-dockerhub-autobuild}
OS=${OS:-linux} OS=${OS:-linux}
if [ -z "${ORG}" ]; then
echo "missing ORG, bailing out!"
fi
if [ -z "${REPO}" ]; then
echo "missing REPO, bailing out!"
fi
if [ -z "${TOKEN}" ]; then if [ -z "${TOKEN}" ]; then
echo "MISSING TOKEN, BAILING OUT!" echo "missing TOKEN, bailing out!"
exit 1 exit 1
fi fi