-
Notifications
You must be signed in to change notification settings - Fork 401
/
action.yml
34 lines (29 loc) 路 1.31 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# For more information see:
# - https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
# - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputsoutput_id
# The action can be referenced in workflows like:
# - ngxs/store/.github/actions/upload-integration-test-artifact@master
# - ./.github/actions/upload-integration-test-artifact
name: upload-integration-test-artifact
description: Upload an integration test artifact with a name such as 'hello-world-ng16'.
inputs:
script:
description: A script with a name such as 'integration:ng16' that generates an integration test artifact.
required: true
runs:
using: 'composite'
steps:
- name: Generate an artifact name
id: artifact-name
shell: bash
run: |
echo "Replace colons with dashes, substring 'integration' with a substring 'hello-world'. Example result: hello-world-ng16"
echo "value=$(echo ${SCRIPT} | sed -r "s/:/-/g" | sed -r "s/integration/hello-world/g")" >> $GITHUB_OUTPUT
env:
SCRIPT: ${{ inputs.script }}
- name: Upload ${{ inputs.script }} artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact-name.outputs.value }}
path: ./integrations/**/dist-integration/main.*.js
retention-days: 1