summaryrefslogtreecommitdiff
path: root/.github/workflows/tarball-test.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/tarball-test.yml')
-rw-r--r--.github/workflows/tarball-test.yml22
1 files changed, 19 insertions, 3 deletions
diff --git a/.github/workflows/tarball-test.yml b/.github/workflows/tarball-test.yml
index db49977cbf..e99c4515c8 100644
--- a/.github/workflows/tarball-test.yml
+++ b/.github/workflows/tarball-test.yml
@@ -35,19 +35,32 @@ jobs:
BRANCH: master
outputs:
branch: ${{ env.BRANCH }}
+ skip: ${{ steps.skipping.outputs.skip }}
steps:
+ - id: skipping
+ run:
+ echo 'skip=true' >> $GITHUB_OUTPUT
+ if: >-
+ ${{(false
+ || contains(github.event.head_commit.message, '[DOC]')
+ || contains(github.event.pull_request.title, '[DOC]')
+ || contains(github.event.pull_request.labels.*.name, 'Documentation')
+ || (github.event.pull_request.user.login == 'dependabot[bot]')
+ )}}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
- fetch-depth: 0
+ fetch-depth: 1 # actions/checkout fetches all heads/tags unless > 0
# tool/make-snapshot derives the branch name from HEAD and looks up
# the upstream during ChangeLog generation. Detached checkouts
# (pull_request, merge_group) lack a local branch with tracking, so
# pin one to HEAD and connect it to the matching origin ref.
- name: Materialize local branch
run: |
- git fetch --no-tags --depth=1 origin "+refs/heads/$BRANCH:refs/remotes/origin/$BRANCH"
+ git fetch --no-tags --depth=1 origin "+refs/heads/$BASE:refs/remotes/origin/$BASE"
git checkout -B "$BRANCH" HEAD
- git branch --set-upstream-to="origin/$BRANCH" "$BRANCH"
+ git branch --set-upstream-to="origin/$BASE" "$BRANCH"
+ env:
+ BASE: ${{ github.base_ref || env.BRANCH }}
- uses: ./.github/actions/make-snapshot
with:
archname: snapshot-${{ env.BRANCH }}
@@ -55,6 +68,7 @@ jobs:
ubuntu:
needs: tarball
+ if: ${{ ! needs.tarball.outputs.skip }}
uses: ./.github/workflows/tarball-ubuntu.yml
with:
archname: snapshot-${{ needs.tarball.outputs.branch }}
@@ -63,6 +77,7 @@ jobs:
macos:
needs: tarball
+ if: ${{ ! needs.tarball.outputs.skip }}
uses: ./.github/workflows/tarball-macos.yml
with:
archname: snapshot-${{ needs.tarball.outputs.branch }}
@@ -71,6 +86,7 @@ jobs:
windows:
needs: tarball
+ if: ${{ ! needs.tarball.outputs.skip }}
uses: ./.github/workflows/tarball-windows.yml
with:
archname: snapshot-${{ needs.tarball.outputs.branch }}