-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[🔥AUDIT🔥] Ensure that Chromatic builds are not triggered on release P…
…Rs (#2061) 🖍 _This is an audit!_ 🖍 ## Summary: After a new Release PR was created, I noticed that the Chromatic build was still triggered (right after marking the build as skipped). This PR updates the Chromatic workflows to avoid triggering on release PRs for once and for all, and only auto-accept changes on `main` pushes. Also took the opportunity to fix an issue where the Chromatic build was not being triggered after moving a normal PR from "draft" to "ready for review". Issue: XXX-XXXX ## Test plan: Verify that the chromatic builds are no longer triggered on release PRs and instead are skipped. Also verify that chromatic builds are still auto-approved on `main` pushes. Author: jandrade Auditors: #wonder-blocks Required Reviewers: Approved By: Checks: ✅ codecov/project, ✅ Chromatic - Get results on non-draft regular PRs (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 2/2), ✅ Lint (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 1/2), ✅ Check build sizes (ubuntu-latest, 16.x), ✅ Chromatic - Build on non-draft regular PRs / chromatic (ubuntu-latest, 16.x), ⏭ Chromatic - Skip on Release PR (changesets), ✅ gerald, ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 16.x), ⏭ dependabot Pull Request URL: #2061
- Loading branch information
Showing
4 changed files
with
40 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
name: Chromatic - Push | ||
|
||
on: push | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'dependabot/**' | ||
|
||
jobs: | ||
|
||
# ------- Dependabot PRs -------- | ||
chromatic_dependabot: | ||
# (else) Run this step on dependabot PRs. | ||
# (if) Run this step on dependabot PRs. | ||
if: github.actor == 'dependabot[bot]' | ||
name: Chromatic - Skip on dependabot PRs (push) | ||
uses: ./.github/workflows/chromatic-build.yml | ||
with: | ||
target: 'bot' | ||
secrets: | ||
projectToken: ${{ secrets.CHROMATIC_APP_CODE }} | ||
|
||
# ------- main branch -------- | ||
chromatic_main: | ||
# (else) Run this step on the main branch. | ||
if: github.ref_name == 'main' | ||
name: Chromatic - Auto-approve on main (push) | ||
uses: ./.github/workflows/chromatic-build.yml | ||
with: | ||
target: 'main' | ||
secrets: | ||
projectToken: ${{ secrets.CHROMATIC_APP_CODE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters