Skip to content

Commit

Permalink
build(workflows): only run when changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsNotGoodName committed Nov 8, 2023
1 parent 5feb15e commit 1adaae1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,23 @@ on:
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-22.04
outputs:
nightly: ${{ steps.nightly.outputs.nightly }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- id: nightly
name: Check if current branch is nightly
run: (git tag --points-at HEAD | grep -wq "nightly" && echo "nightly=true") || echo "nightly=false" >> $GITHUB_OUTPUT

nightly:
needs: [check]
if: ${{ needs.check.outputs.nightly == 'false' }}
permissions:
contents: write
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 1adaae1

Please sign in to comment.