Skip to content

Commit

Permalink
final version 😓
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed May 19, 2023
1 parent 2a33722 commit e0ac79b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/generate-sandboxes-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
schedule:
- cron: '2 2 */1 * *'
workflow_dispatch:
# To test fixes on push rather than wait for the scheduling, do the following:
# 1. Uncomment the lines below and add your branch.
# push:
# branches:
# - <your-branch-name>
# 2. change the "ref" value to <your-branch-name> in the actions/checkout step below.
# 3. 👉 DON'T FORGET TO UNDO THE VALUES BACK TO `main` BEFORE YOU MERGE YOUR CHANGES!

jobs:
generate:
Expand Down Expand Up @@ -41,3 +48,10 @@ jobs:
- name: Publish
run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=main
working-directory: ./code
- name: The job has failed
if: ${{ failure() || cancelled() }}
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
uses: Ilshidur/action-discord@master
with:
args: 'The generation of sandboxes in the **main** branch has failed. [View Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})'
17 changes: 11 additions & 6 deletions .github/workflows/generate-sandboxes-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ on:
schedule:
- cron: '2 2 */1 * *'
workflow_dispatch:
push:
branches:
- norbert/discord-message-generate-sandboxes-fail
# To test fixes on push rather than wait for the scheduling, do the following:
# 1. Uncomment the lines below and add your branch.
# push:
# branches:
# - <your-branch-name>
# 2. change the "ref" value to <your-branch-name> in the actions/checkout step below.
# 3. 👉 DON'T FORGET TO UNDO THE VALUES BACK TO `next` BEFORE YOU MERGE YOUR CHANGES!

jobs:
generate:
runs-on: ubuntu-latest
Expand All @@ -19,7 +24,7 @@ jobs:
node-version: 16
- uses: actions/checkout@v3
with:
ref: norbert/discord-message-generate-sandboxes-fail
ref: next
- name: Setup git user
run: |
git config --global user.name "Storybook Bot"
Expand All @@ -41,12 +46,12 @@ jobs:
run: yarn generate-sandboxes --local-registry
working-directory: ./code
- name: Publish
run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=norbert/discord-message-generate-sandboxes-fail
run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=next
working-directory: ./code
- name: The job has failed
if: ${{ failure() || cancelled() }}
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
uses: Ilshidur/action-discord@master
with:
args: 'generate sandboxes norbert/discord-message-generate-sandboxes-fail has failed. [View Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs/${{ github.job }})'
args: 'The generation of sandboxes in the **next** branch has failed. [View Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})'

0 comments on commit e0ac79b

Please sign in to comment.