Skip to content

Commit

Permalink
es modules: update testing workflow clean up step
Browse files Browse the repository at this point in the history
Change the script to use dynamic import of module.

Signed-off-by: Chris. Webster <[email protected]>
  • Loading branch information
webstech committed Aug 12, 2024
1 parent fbf9a24 commit cb6ecfa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ jobs:
with:
github-token: ${{ env.GGG_TOKEN }}
script: |
const exports = require(`${process.env.GITHUB_WORKSPACE}/gitgitgadget/build/lib/delete-ci-test-branches.js`)
await exports.deleteBranches(github, process.env.GITHUB_REPOSITORY_OWNER, process.env.GGG_REPOSITORY);
const {pathToFileURL} = await import("node:url");
const filePath = pathToFileURL(`${process.env.GITHUB_WORKSPACE}/gitgitgadget/build/lib/delete-ci-test-branches.js`);
const {deleteBranches} = await import(filePath);
await deleteBranches(github, process.env.GITHUB_REPOSITORY_OWNER, process.env.GGG_REPOSITORY);
if: env.GGG_REPOSITORY

0 comments on commit cb6ecfa

Please sign in to comment.