Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorcast-db committed Jul 9, 2024
1 parent 1cc6fee commit 3cf735e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Validate Tag
run: |
MSG=$(git log --format=%B -n 1 ${{github.event.after}})
TAG=$(echo MSG | sed 's/\[\(.*\)\].*/\1/')
MSG=$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }})
TAG=$(echo $MSG | sed -ne 's/\[\(.*\)\].*/\1/p')
echo "Found tag {$TAG}"
LINE=$(cat .codegen/changelog_config.yml | grep "tag: \"\[$(echo $TAG)\]\"")
VALID=$([ -z "$TAG" ] && echo "False" || echo "True")
echo "::set-env name=VALID_TAG::${TAG}"
- name: Valid Tag
if: ${{VALID}} != "true"
uses: actions/github-script@v3
with:
script: |
core.setFailed('Invalid tag name')
# Store in variable to hide the result from the console output
MATCH=$(cat .codegen/changelog_config.yml | grep "tag: \"\[$(echo $TAG)\]\"")
- name: Log failure
if: failure()
run: |
echo "Invalid or missing tag in commit message"
exit 1

0 comments on commit 3cf735e

Please sign in to comment.