Skip to content

Commit

Permalink
improve deployment on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
dennybaa committed Mar 24, 2021
1 parent aada262 commit 2f0e145
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/deploy-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
-
id: print
run: echo "::set-output name=shortRev::$(git rev-parse --short HEAD)"
-
-
uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ github.ref }}
regex: '^refs\/tags\/(v[0-9]+\.[0-9]+\.[0-9](-?\w*)?)$'
regex: '^refs\/tags\/(v[0-9]+\.[0-9]+\.[0-9](-?.*)?)$'
-
name: Map runtime environment data
uses: kanga333/[email protected]
Expand Down Expand Up @@ -48,6 +48,14 @@ jobs:
"RUNNER": "stage"
}
}
-
name: Cancel deployment (deployment tag missmatch)
if: ${{ steps.regex-match.outputs.group1 == '' }}
uses: chrnorm/deployment-status@releases/v1
with:
token: ${{ github.token }}
state: failure
deployment_id: ${{ github.event.deployment.id }}

outputs:
shortRev: ${{ steps.print.outputs.shortRev }}
Expand Down

0 comments on commit 2f0e145

Please sign in to comment.