From ba14554f9137189bad3725a0ef31b38bb5e26e97 Mon Sep 17 00:00:00 2001 From: mbruzda Date: Mon, 13 May 2024 12:10:43 +0200 Subject: [PATCH] fix: notify of delay-destroy deprication --- .github/workflows/main.yml | 6 ++++++ action.yaml | 3 ++- entrypoint.sh | 8 ++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1207476..a74f903 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,12 @@ on: - "main" - "develop" +permissions: + contents: write + packages: write + pull-requests: read + statuses: write + jobs: pre-commit: runs-on: ubuntu-latest diff --git a/action.yaml b/action.yaml index 4767a0a..972ab36 100644 --- a/action.yaml +++ b/action.yaml @@ -1,3 +1,4 @@ + # ######################################################################## # Copyright 2021 Splunk Inc. # @@ -80,7 +81,7 @@ outputs: description: 'Name of workflow triggered' runs: using: 'docker' - image: 'docker://ghcr.io/splunk/wfe-test-runner-action/wfe-test-runner-action:v1.6.9' + image: 'Dockerfile' args: - ${{ inputs.workflow-tmpl-name }} - ${{ inputs.workflow-template-ns }} diff --git a/entrypoint.sh b/entrypoint.sh index bb063f9..e16540f 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -24,9 +24,13 @@ else BRANCH_NAME=${GITHUB_HEAD_REF} fi +if [[ ${3} ]] +then + echo "::warning title=Delay destroy not supported::Delay destroy is deprecated, please update your reusable workflow version" +fi WORKFLOW_NAME=`argo submit -v -o json --from wftmpl/${1} -n ${2} -l workflows.argoproj.io/workflow-template=${1} --argo-base-href '' \ -p ci-repository-url="https://github.com/${GITHUB_REPOSITORY}.git" \ - -p ci-commit-sha=${BRANCH_NAME} -p delay-destroy=${3} \ + -p ci-commit-sha=${BRANCH_NAME} \ -p addon-url="${4}" \ -p job-name=${5} \ -p splunk-version=${6} \ @@ -46,4 +50,4 @@ echo "After argo submit $?" echo 'WORKFLOW_NAME:' ${WORKFLOW_NAME} echo "workflow-name=$(echo $WORKFLOW_NAME)" >> $GITHUB_OUTPUT -argo logs --follow ${WORKFLOW_NAME} -n ${2} +argo logs --follow ${WORKFLOW_NAME} -n ${2} \ No newline at end of file