Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Latest commit

 

History

History
55 lines (37 loc) · 1.24 KB

README.md

File metadata and controls

55 lines (37 loc) · 1.24 KB

Persist Data Between Jobs

License: MIT

Allows data to be shared between jobs and accessed via env variables and step output


Inputs

data

Optional The data to persist from job

variable

Optional The variable to be used to access data in other jobs

retrieve_variables

Optional Comma delimited list of variables to load into job


Examples

Example storing data

- uses: nick-invision/persist-action-data@v1
  with:
    data: ${{ steps.some-step.output.some-output }}
    variable: SOME_STEP_OUTPUT

Example using data from another job via env variable

- uses: nick-invision/persist-action-data@v1
  with:
    data: ${{ steps.some-step.output.some-output }}
    retrieve_variables: SOME_STEP_OUTPUT, SOME_OTHER_STEP_OUTPUT
- run: echo $SOME_STEP_OUTPUT

Example using data from another job via output

- uses: nick-invision/persist-action-data@v1
  id: global-data
  with:
    data: ${{ steps.some-step.output.some-output }}
    retrieve_variables: SOME_STEP_OUTPUT, SOME_OTHER_STEP_OUTPUT
- run: echo ${{ steps.global-data.outputs.SOME_STEP_OUTPUT }}