From 3481fa9a361d9557136e1a837c2455578025fe5e Mon Sep 17 00:00:00 2001 From: ItsNotGoodName Date: Tue, 7 Nov 2023 16:10:39 -0800 Subject: [PATCH] build(workflows): only run when changes --- .github/workflows/nightly.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5d38a1e..dd5516d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -6,10 +6,25 @@ on: workflow_dispatch: jobs: + check: + runs-on: ubuntu-22.04 + outputs: + nightly: ${{ steps.check.nightly.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: permissions: contents: write runs-on: ubuntu-22.04 + if: needs.check.outputs.nightly != 'true' steps: - name: Checkout uses: actions/checkout@v4