Skip to content

Commit 9f72fa3

Browse files
authored
fix(ci): use dynamic imports for actions/github-script scripts (#1217)
1 parent ba6e829 commit 9f72fa3

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/build-previews.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
id: get-workflow-artifacts
2222
with:
2323
script: |
24-
import script from './.github/actions/get-workflow-artifacts.ts'
24+
const { default: script } = await import('${{ github.workspace }}/.github/actions/get-workflow-artifacts.ts')
2525
await script({ github, context, core })
2626
2727
- name: Find comment

.github/workflows/bump-manifest-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
INPUT_VERSION: ${{ github.event.inputs.version }}
3636
with:
3737
script: |
38-
import script from './.github/actions/bump-manifest-version.ts'
38+
const { default: script } = await import('${{ github.workspace }}/.github/actions/bump-manifest-version.ts')
3939
await script({ github, context, core })
4040
4141
- name: Format with Biome

.github/workflows/delete-pr-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ jobs:
1818
uses: actions/github-script@v8
1919
with:
2020
script: |
21-
import script from './.github/actions/delete-artifacts.ts'
21+
const { default: script } = await import('${{ github.workspace }}/.github/actions/delete-artifacts.ts')
2222
await script({ github, context, core })

.github/workflows/nightly-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
id: version
117117
with:
118118
script: |
119-
import script from './.github/actions/get-built-version.ts'
119+
const { default: script } = await import('${{ github.workspace }}/.github/actions/get-built-version.ts')
120120
await script({ github, context, core })
121121
122122
- name: Delete existing release

.github/workflows/release-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
id: version
3939
with:
4040
script: |
41-
import script from './.github/actions/get-built-version.ts'
41+
const { default: script } = await import('${{ github.workspace }}/.github/actions/get-built-version.ts')
4242
await script({ github, context, core })
4343
4444
- name: Delete existing release # To keep the workflow idempotent.

.github/workflows/release-stable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
INPUT_VERSION: ${{ github.event.inputs.version }}
4444
with:
4545
script: |
46-
import script from './.github/actions/validate-stable-release.ts'
46+
const { default: script } = await import('${{ github.workspace }}/.github/actions/validate-stable-release.ts')
4747
await script({ github, context, core })
4848
4949
- name: Build
@@ -54,7 +54,7 @@ jobs:
5454
id: version
5555
with:
5656
script: |
57-
import script from './.github/actions/get-built-version.ts'
57+
const { default: script } = await import('${{ github.workspace }}/.github/actions/get-built-version.ts')
5858
await script({ github, context, core })
5959
6060
- name: Delete existing release # To keep the workflow idempotent.

.github/workflows/tests-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: actions/github-script@v8
2323
with:
2424
script: |
25-
import script from './.github/actions/tests-e2e-filter.ts'
25+
const { default: script } = await import('${{ github.workspace }}/.github/actions/tests-e2e-filter.ts')
2626
await script({ github, context, core })
2727
2828
test-e2e:

0 commit comments

Comments
 (0)