Files
alfresco-ng2-components/.github/actions/artifact-extract/action.yml
Giovanni Fertuso 3daecb1b1c [AAE-18117] Use SHA for GitHub actions (#9113)
* AAE-18117 - Add pre-checks job

* AAE-18117 - Use pinned SHA

* AAE-18117 - Update dependabot.yml
2023-11-27 10:58:24 +00:00

41 lines
1.0 KiB
YAML

name: Extract Artifact
description: 'Allow the user to extract content from an artifact'
inputs:
artifact-name:
description: 'The name of the artifact'
required: true
type: string
file-name:
description: 'The name of the file with extension created in the artifact'
required: true
type: string
content:
description: 'The init content the file should have'
type: string
default: ""
outputs:
result:
description: "the value extrated from the file inside the artifact"
value: ${{ steps.extract.outputs.result }}
runs:
using: "composite"
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- run: echo "Artifact Extract"
shell: bash
- name: Download artifact
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: ${{ inputs.artifact-name }}
- id: extract
shell: bash
run: |
value=`cat ${{ inputs.file-name }}`
echo "print $value"
echo "result=$value" >> $GITHUB_OUTPUT