From d6c654783a777a574b00b8894b1821fad6ca6a76 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Sat, 16 Apr 2022 11:26:22 +0530 Subject: [PATCH] fix: load secrets in CI --- .woodpecker.yml | 1 + scripts/ci.sh | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 3230dc4..69e3dff 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -8,3 +8,4 @@ pipeline: - make - ls -lah && find scripts && cat scripts/ci.sh - make ci-deploy + secrets: [ pages_deploy_secret, hostea_write_deploy_key] diff --git a/scripts/ci.sh b/scripts/ci.sh index 691d2ae..1a0d373 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -15,11 +15,20 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -set -Eeuo pipefail -source $(pwd)/scripts/lib.sh +set -xEeuo pipefail +#source $(pwd)/scripts/lib.sh readonly SSH_ID_FILE=/tmp/ci-ssh-id +match_arg() { + if [ $1 == $2 ] || [ $1 == $3 ] + then + return 0 + else + return 1 + fi +} + help() { cat << EOF USAGE: ci.sh [SUBCOMMAND]