Skip to content

Commit 8dcd7cb

Browse files
committed
bring main up-to-date with updated github workflows from #32621 and #32607
1 parent 7d02047 commit 8dcd7cb

File tree

6 files changed

+222
-116
lines changed

6 files changed

+222
-116
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 'Setup Node.js and Install Dependencies'
2+
description: 'Sets up Node.js, caches dependencies, and installs packages for Storybook'
3+
4+
inputs:
5+
install-code-deps:
6+
description: 'Whether to install code dependencies in addition to script dependencies'
7+
required: false
8+
default: 'false'
9+
10+
runs:
11+
using: 'composite'
12+
steps:
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version-file: '.nvmrc'
17+
18+
- name: Update npm to latest
19+
shell: bash
20+
run: npm install -g npm@latest
21+
22+
- name: Cache dependencies
23+
uses: actions/cache@v4
24+
with:
25+
path: |
26+
~/.yarn/berry/cache
27+
key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
28+
restore-keys: |
29+
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
30+
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}
31+
yarn-v1
32+
33+
- name: Install script dependencies
34+
shell: bash
35+
working-directory: scripts
36+
run: yarn install
37+
38+
- name: Install code dependencies
39+
if: inputs.install-code-deps == 'true'
40+
shell: bash
41+
working-directory: code
42+
run: yarn install

.github/workflows/generate-sandboxes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
if: failure()
6969
env:
7070
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
71-
uses: Ilshidur/action-discord@master
71+
uses: Ilshidur/action-discord@d2594079a10f1d6739ee50a2471f0ca57418b554
7272
with:
7373
args: |
7474
The generation of some or all sandboxes on the **next** branch has failed.
@@ -120,7 +120,7 @@ jobs:
120120
if: failure()
121121
env:
122122
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
123-
uses: Ilshidur/action-discord@master
123+
uses: Ilshidur/action-discord@d2594079a10f1d6739ee50a2471f0ca57418b554
124124
with:
125125
args: |
126126
The generation of some or all sandboxes on the **main** branch has failed.

.github/workflows/prepare-non-patch-release.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
prepare-non-patch-pull-request:
3838
name: Prepare non-patch pull request
3939
runs-on: ubuntu-latest
40-
environment: release
40+
environment: Release
4141
defaults:
4242
run:
4343
working-directory: scripts
@@ -51,26 +51,8 @@ jobs:
5151
fetch-depth: 10000
5252
token: ${{ secrets.GH_TOKEN }}
5353

54-
- name: Setup Node.js
55-
uses: actions/setup-node@v4
56-
with:
57-
node-version-file: ".nvmrc"
58-
59-
- name: Cache dependencies
60-
uses: actions/cache@v4
61-
with:
62-
path: |
63-
~/.yarn/berry/cache
64-
key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
65-
restore-keys: |
66-
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
67-
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}
68-
yarn-v1
69-
70-
- name: Install Dependencies
71-
working-directory: .
72-
run: |
73-
yarn task --task=install
54+
- name: Setup Node.js and Install Dependencies
55+
uses: ./.github/actions/setup-node-and-install
7456

7557
- name: Check if pull request is frozen
7658
if: github.event_name != 'workflow_dispatch'
@@ -160,6 +142,6 @@ jobs:
160142
if: failure()
161143
env:
162144
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
163-
uses: Ilshidur/action-discord@master
145+
uses: Ilshidur/action-discord@d2594079a10f1d6739ee50a2471f0ca57418b554
164146
with:
165147
args: "The GitHub Action for preparing the release pull request bumping from v${{ steps.bump-version.outputs.current-version }} to v${{ steps.bump-version.outputs.next-version }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

.github/workflows/prepare-patch-release.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
prepare-patch-pull-request:
2020
name: Prepare patch pull request
2121
runs-on: ubuntu-latest
22-
environment: release
22+
environment: Release
2323
defaults:
2424
run:
2525
working-directory: scripts
@@ -30,26 +30,8 @@ jobs:
3030
ref: main
3131
token: ${{ secrets.GH_TOKEN }}
3232

33-
- name: Setup Node.js
34-
uses: actions/setup-node@v4
35-
with:
36-
node-version-file: ".nvmrc"
37-
38-
- name: Cache dependencies
39-
uses: actions/cache@v4
40-
with:
41-
path: |
42-
~/.yarn/berry/cache
43-
key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
44-
restore-keys: |
45-
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
46-
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}
47-
yarn-v1
48-
49-
- name: Install Dependencies
50-
working-directory: .
51-
run: |
52-
yarn task --task=install
33+
- name: Setup Node.js and Install Dependencies
34+
uses: ./.github/actions/setup-node-and-install
5335

5436
- name: Check if pull request is frozen
5537
if: github.event_name != 'workflow_dispatch'
@@ -183,6 +165,6 @@ jobs:
183165
if: failure()
184166
env:
185167
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
186-
uses: Ilshidur/action-discord@master
168+
uses: Ilshidur/action-discord@d2594079a10f1d6739ee50a2471f0ca57418b554
187169
with:
188170
args: "The GitHub Action for preparing the release pull request bumping from v${{ steps.versions.outputs.current }} to v${{ steps.versions.outputs.next }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

0 commit comments

Comments
 (0)