Skip to content

Commit

Permalink
fix: check tag
Browse files Browse the repository at this point in the history
  • Loading branch information
fad3t committed Oct 7, 2024
1 parent 8880a57 commit c10c294
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ name: build
run-name: ${{ github.actor }} is running a build

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-*
# push:
# tags:
# - v[0-9]+.[0-9]+.[0-9]+
# - v[0-9]+.[0-9]+.[0-9]+-*
workflow_dispatch:
inputs:
tag:
description: tag
required: true

jobs:
build-first:
Expand All @@ -17,6 +22,14 @@ jobs:
- name: check out code
uses: actions/checkout@v4

- name: validate tag
shell: bash
run: |
if [[ ! "${{ inputs.tag }}" =~ "^v?[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]*)?$" ]]; then
echo "tag ${{ inputs.tag }} is invalid.."
exit 1
fi
- name: display super secret
env:
top-secret: ${{ secrets.TOP_SECRET }}
Expand Down

0 comments on commit c10c294

Please sign in to comment.