From 10496fcc5ab2068214678fbdc80019eb5506cf5c Mon Sep 17 00:00:00 2001 From: Paul Fouquet Date: Mon, 2 Oct 2023 13:30:30 +1300 Subject: [PATCH] ci: dryrun create namespace --- .github/workflows/main.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 36e12895..d9fe5cbf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,9 +56,12 @@ jobs: if: ${{ !(github.ref == 'refs/heads/master') }} run: | ./argo-linux-amd64 lint templates/ -n argo - TEST_NAMESPACE=${GITHUB_REF_NAME////-} - echo $TEST_NAMESPACE - ./argo-linux-amd64 lint workflows/ -n argo + TEST_NAMESPACE=${GITHUB_REF_NAME////-}-$GITHUB_SHA + kubectl create namespace $TEST_NAMESPACE --dry-run + # May need to deploy config files too + #$TEST_NAMESPACE + #kubectl apply -f templates/argo-tasks/ --namespace $TEST_NAMESPACE + ./argo-linux-amd64 lint workflows/ -n argo - name: Deploy workflows if: github.ref == 'refs/heads/master' @@ -82,5 +85,7 @@ jobs: - name: Re-Lint workflows if: github.ref == 'refs/heads/master' run: | + echo "delete $TEST_NAMESPACE" ./argo-linux-amd64 lint templates/ -n argo ./argo-linux-amd64 lint workflows/ -n argo +