From eb5c6b9dd4eb114678af9db58330298e1877bfb9 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Tue, 14 May 2024 10:57:45 -0700 Subject: [PATCH] Add sample gh workflow that skips a job if tag has a certain prefix Signed-off-by: Eduardo Apolinario --- .github/workflows/g-release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/g-release.yml diff --git a/.github/workflows/g-release.yml b/.github/workflows/g-release.yml new file mode 100644 index 0000000000..36ccd8c2c6 --- /dev/null +++ b/.github/workflows/g-release.yml @@ -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" +