Skip to content

Commit

Permalink
chore: Don't update nightly after push to main if we're expecting a r…
Browse files Browse the repository at this point in the history
…elease branch shortly
  • Loading branch information
scouten-adobe committed Sep 29, 2024
1 parent f724c68 commit fbf3c32
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,19 @@ jobs:
if [[ "$OLD_BASE_COMMIT" == "$NEW_BASE_COMMIT" && "$GH_EVENT_NAME" == "pull_request" ]]; then
echo "Nightly already points to same base; leave unchanged";
echo "base-commit=skip" >> "$GITHUB_OUTPUT"
else
echo "Updating nightly base";
echo "base-commit=$NEW_BASE_COMMIT" >> "$GITHUB_OUTPUT"
exit 0
elif [[ "$GH_EVENT_NAME" == "push" ]]; then
LATEST_TAG=$(git describe --tags --abbrev=0)
if ![[ git --no-pager log $LATEST_TAG..head --pretty=format:"%s" | grep -v "^chore" ]];
echo "Found non-chore commits on main since last commit; leave unchanged"
echo "(Expecting release-plz to create a new release branch)"
echo "base-commit=skip" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "Updating nightly base";
echo "base-commit=$NEW_BASE_COMMIT" >> "$GITHUB_OUTPUT"
- name: Install Rust toolchain
if: ${{ steps.choose-base.outputs.base-commit != 'skip' }}
uses: dtolnay/rust-toolchain@stable
Expand Down

0 comments on commit fbf3c32

Please sign in to comment.