-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: re-work cleanup pipeline (#2869)
- Loading branch information
1 parent
c3a3d82
commit 700f6ef
Showing
1 changed file
with
12 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ on: | |
branches: [main, release/**, next/**] | ||
|
||
jobs: | ||
storybook: | ||
if: "contains(github.event.pull_request.labels.*.name, 'Build: Storybook')" | ||
cleanup: | ||
if: "contains(github.event.pull_request.labels.*.name, 'Build: Storybook') || contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')" | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
|
@@ -26,33 +26,20 @@ jobs: | |
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: | | ||
- name: Setup git user | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
- name: Remove pr storybook deployment | ||
if: "contains(github.event.pull_request.labels.*.name, 'Build: Storybook')" | ||
run: | | ||
git rm -r next/pr/${{ github.event.number }} | ||
git commit -m "PR ${{ github.event.number }} closed - remove storybook" | ||
git push | ||
react-contoso: | ||
if: "contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')" | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
- name: Remove pr test app deployment | ||
if: "contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')" | ||
run: | | ||
git rm -r next/sample/pr/${{ github.event.number }} | ||
git commit -m "PR ${{ github.event.number }} closed - remove react-contoso" | ||
- name: Push changes | ||
run: | | ||
git push |