From b0300057c6af33db64721b44560ff8ca3f32df6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sat, 16 Apr 2022 09:34:37 +0100 Subject: [PATCH] fix the deploy script, --- .github/workflows/deploy.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bb9793d5..175461a6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,9 +17,12 @@ jobs: steps: - uses: actions/checkout@v3 - run: | - git tag --list | grep ${{ inputs.job_name }} || (git tag ${{ inputs.job_name }} ${{ inputs.rev }} && git push --tags) + git tag --list | grep $JOB_NAME || (git tag $JOB_NAME $REV && git push --tags) git fetch --all --tags - if [[ ! git merge-base --is-ancestor ${{ inputs.rev }} ${{ inputs.job_name }} ]]; then - git tag -f ${{ inputs.job_name }} ${{ inputs.rev }} + if [[ ! git merge-base --is-ancestor $REV $JOB_NAME ]]; then + git tag -f $JOB_NAME $REV git push --tags --force fi + env: + JOB_NAME: ${{ github.event.inputs.job_name }} + REV: ${{ github.event.inputs.rev }}