fb53ee6ba3
- full diff: https://github.com/actions/github-script/compare/v6.4.1...v7.0.1 breaking changes: https://github.com/actions/github-script?tab=readme-ov-file#v7 > Version 7 of this action updated the runtime to Node 20 > https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions > > All scripts are now run with Node 20 instead of Node 16 and are affected > by any breaking changes between Node 16 and 20 > > The previews input now only applies to GraphQL API calls as REST API previews > are no longer necessary > https://github.blog/changelog/2021-10-14-rest-api-preview-promotions/. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
35 lines
1 KiB
YAML
35 lines
1 KiB
YAML
# reusable workflow
|
|
name: .test-prepare
|
|
|
|
# TODO: hide reusable workflow from the UI. Tracked in https://github.com/community/community/discussions/12025
|
|
|
|
on:
|
|
workflow_call:
|
|
outputs:
|
|
matrix:
|
|
description: Test matrix
|
|
value: ${{ jobs.run.outputs.matrix }}
|
|
|
|
jobs:
|
|
run:
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
matrix: ${{ steps.set.outputs.matrix }}
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Create matrix
|
|
id: set
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
let matrix = ['graphdriver'];
|
|
if ("${{ contains(github.event.pull_request.labels.*.name, 'containerd-integration') || github.event_name != 'pull_request' }}" == "true") {
|
|
matrix.push('snapshotter');
|
|
}
|
|
await core.group(`Set matrix`, async () => {
|
|
core.info(`matrix: ${JSON.stringify(matrix)}`);
|
|
core.setOutput('matrix', JSON.stringify(matrix));
|
|
});
|