Skip to content

Commit

Permalink
Add sample gh workflow that skips a job if tag has a certain prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario committed May 14, 2024
1 parent f473673 commit eb5c6b9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/g-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release Workflow

on:
release:
types: [published]

jobs:
job1:
runs-on: ubuntu-latest
if: "!startsWith(github.event.release.tag_name, 'abc/')"
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Run a script
run: echo "This job runs unless the tag starts with 'abc/'"

job2:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Always run this job
run: echo "This job always runs regardless of the tag prefix"

0 comments on commit eb5c6b9

Please sign in to comment.