Skip to content

Commit

Permalink
gh-actions/github/context: Fix/improve output (#940)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax authored Nov 5, 2023
1 parent 530ad16 commit be37693
Showing 1 changed file with 32 additions and 13 deletions.
45 changes: 32 additions & 13 deletions gh-actions/github/context/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,66 @@ inputs:
step
env
vars
env:
type: string
job:
type: string
needs:
type: string
vars:
type: string


runs:
using: composite
steps:
- uses: envoyproxy/toolshed/gh-actions/[email protected].11
- uses: envoyproxy/toolshed/gh-actions/[email protected].12
name: Config
id: config
with:
input: ${{ inputs.resources }}
options: -Rs
filter: |
split("\n") | map(select(length > 0))
- uses: envoyproxy/toolshed/gh-actions/[email protected].11
name: Print `github`
- uses: envoyproxy/toolshed/gh-actions/[email protected].12
name: Print github
if: ${{ contains(fromJSON(steps.config.outputs.value), 'github') }}
with:
input: ${{ toJSON(github) }}
options: -C
filter: '.'
print-result: true
- uses: envoyproxy/toolshed/gh-actions/[email protected].11
name: Print `runner`
- uses: envoyproxy/toolshed/gh-actions/[email protected].12
name: Print runner
if: ${{ contains(fromJSON(steps.config.outputs.value), 'runner') }}
with:
input: ${{ toJSON(runner) }}
options: -C
filter: '.'
print-result: true
- uses: envoyproxy/toolshed/gh-actions/[email protected].11
- uses: envoyproxy/toolshed/gh-actions/[email protected].12
name: Print job
if: ${{ contains(fromJSON(steps.config.outputs.value), 'job') }}
with:
input: ${{ toJSON(job) }}
input: ${{ inputs.job || toJSON(job) }}
options: -C
filter: '.'
print-result: true
- uses: envoyproxy/toolshed/gh-actions/[email protected].11
- uses: envoyproxy/toolshed/gh-actions/[email protected].12
name: Print env
if: ${{ contains(fromJSON(steps.config.outputs.value), 'env') }}
with:
input: ${{ toJSON(env) }}
input: ${{ inputs.env || toJSON(env) }}
options: -C
print-result: true
- uses: envoyproxy/toolshed/gh-actions/[email protected]
name: Print env
if: ${{ contains(fromJSON(steps.config.outputs.value), 'needs') && inputs.needs }}
with:
input: ${{ inputs.needs }}
options: -C
print-result: true
- uses: envoyproxy/toolshed/gh-actions/[email protected]
name: Print env
if: ${{ contains(fromJSON(steps.config.outputs.value), 'vars') && inputs.vars }}
with:
input: ${{ inputs.vars }}
options: -C
filter: '.'
print-result: true

0 comments on commit be37693

Please sign in to comment.