Compare commits
2 Commits
0b45c6adf1
...
d72d43a51f
Author | SHA1 | Date | |
---|---|---|---|
d72d43a51f | |||
b569e49893 |
15
.gitea/workflows/shellcheck.yml
Normal file
15
.gitea/workflows/shellcheck.yml
Normal file
@ -0,0 +1,15 @@
|
||||
name: Lint Shell files
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
types: [ "opened", "edited" ]
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
shellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- run: apt install shellcheck
|
||||
- run: find . -type f -name "*.sh" -exec shellcheck -a {} \;
|
@ -8,9 +8,14 @@ check_token() {
|
||||
set +e
|
||||
|
||||
echo "Checking for existing token..."
|
||||
token="$(kubectl get secret "$SECRET_NAME" -o jsonpath="{.data['token']}" 2> /dev/null)"
|
||||
[ $? -ne 0 ] && return 1
|
||||
[ -z "$token" ] && return 2
|
||||
if ! token=$(kubectl get secret "${SECRET_NAME}" -o jsonpath="{.data['token']}" 2> /dev/null); then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${token}" ]; then
|
||||
return 2
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user