Skip to content

Commit

Permalink
gh-actions/github/env/save: Save when loading (for subsequent runs)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax committed Nov 11, 2023
1 parent c8e55e8 commit dfb13d5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
15 changes: 15 additions & 0 deletions gh-actions/github/env/load/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ inputs:
run-id:
type: string
required: true
check-name:
type: string
default:


outputs:
data:
Expand Down Expand Up @@ -38,3 +42,14 @@ runs:
input: ${{ steps.data.outputs.value }}
options: -C
print-result: true

- uses: envoyproxy/toolshed/gh-actions/github/env/save@actions-v0.1.36
name: Save env
if: ${{ inputs.check-name }}
with:
name: env-proxy
env-format: yaml
env: |
workflow-env: ${{ inputs.run-id }}
check-name: ${{ inputs.check-name }}
startup-conclusion: ${{ github.event.workflow_run.conclusion }}
16 changes: 14 additions & 2 deletions gh-actions/github/env/save/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,27 @@ inputs:
env:
type: string
required: true
env-format:
type: string
env-filter:
type: string


runs:
using: composite
steps:
- uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.1.36
name: Check proxy data
id: env
with:
input: |
${{ inputs.env }}
input-format: ${{ inputs.env-format }}
filter: ${{ inputs.env-filter || '.' }}
- uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.1.36
name: Print check proxy data
with:
input: ${{ inputs.env }}
input: ${{ steps.env.outputs.value }}
options: -C
print-result: true
- name: Save environment data
Expand All @@ -25,7 +37,7 @@ runs:
printf "%s" "$INPUT_ENV" >> "$OUTPUT_DIR/${{ inputs.name }}.json"
echo "directory=${OUTPUT_DIR}" >> $GITHUB_OUTPUT
env:
INPUT_ENV: ${{ inputs.env }}
INPUT_ENV: ${{ steps.env.outputs.value }}
- name: Upload environment data
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit dfb13d5

Please sign in to comment.