-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use regular workflow instead of composite action
- Loading branch information
Showing
3 changed files
with
46 additions
and
144 deletions.
There are no files selected for viewing
67 changes: 0 additions & 67 deletions
67
.github/actions/generate-sandboxes-composite-action/action.yml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -13,6 +13,14 @@ on: | |
# 3. Comment out the whole "generate-main" job starting at line 26 | ||
# 3. 👉 DON'T FORGET TO UNDO STEP 2 AND 3 BEFORE YOU MERGE YOUR CHANGES! | ||
|
||
env: | ||
YARN_ENABLE_IMMUTABLE_INSTALLS: "false" | ||
CLEANUP_SANDBOX_NODE_MODULES: "true" | ||
|
||
defaults: | ||
run: | ||
working-directory: ./code | ||
|
||
jobs: | ||
generate-next: | ||
name: Generate to next | ||
|
@@ -21,21 +29,42 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
ref: jeppe/25922-ci-generation-of-sandboxes-fail-sometimes-on-prereleases | ||
- uses: ./.github/actions/generate-sandboxes-composite-action | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
|
||
- name: Setup git user | ||
run: | | ||
git config --global user.name "storybook-bot" | ||
git config --global user.email "[email protected]" | ||
- name: Install dependencies | ||
working-directory: ./scripts | ||
run: node --experimental-modules ./check-dependencies.js | ||
|
||
- name: Compile Storybook libraries | ||
run: yarn task --task compile --start-from=auto --no-link | ||
|
||
- name: Publish to local registry | ||
run: yarn local-registry --publish | ||
|
||
- name: Run local registry | ||
run: yarn local-registry --open & | ||
|
||
- name: Wait for registry | ||
run: yarn wait-on tcp:127.0.0.1:6001 | ||
|
||
- name: Generate | ||
run: yarn generate-sandboxes --local-registry | ||
|
||
- name: Publish | ||
run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT }}@github.com/storybookjs/sandboxes.git --push --branch=next | ||
|
||
- name: The job has failed | ||
if: ${{ failure() || cancelled() }} | ||
env: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }} | ||
uses: Ilshidur/action-discord@master | ||
with: | ||
destination-branch: next | ||
token: ${{ secrets.PAT_STORYBOOK_BOT }} | ||
discord-url: ${{ secrets.DISCORD_MONITORING_URL }} | ||
|
||
# generate-main: | ||
# name: Generate to main | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# ref: main | ||
# - uses: ./.github/actions/generate-sandboxes-composite-action | ||
# with: | ||
# destination-branch: main | ||
# token: ${{ secrets.PAT_STORYBOOK_BOT }} | ||
# discord-url: ${{ secrets.DISCORD_MONITORING_URL }} | ||
args: "The generation of sandboxes on the **next** branch has failed. [View Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" |