Skip to content

Commit

Permalink
gh-actions/github/run: Minor fixes (#896)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax committed Oct 26, 2023
1 parent 4db7a00 commit 2b6c4bc
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions gh-actions/github/run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,14 @@ inputs:
runs:
using: composite
steps:
- id: set_env
name: 'Set CI env ${{ inputs.target }}'
run: |
- run: |
if [[ "${#INPUT_ENV}" -ne 0 ]]; then
SOURCETMP="$(mktemp)"
# TODO(phlax): Fix escaping
echo "${{ inputs.env }}" > "$SOURCETMP"
. "$SOURCETMP"
rm -rf "$SOURCETMP"
fi
shell: bash
env:
INPUT_ENV: ${{ inputs.env }}
- run: |
COMMAND=()
if [[ -n "${{ inputs.container-command }}" ]]; then
COMMAND+=(${{ inputs.container-command }})
Expand All @@ -68,7 +62,6 @@ runs:
matcher="$2"
IFS=$'\n' read -ra matches <<< "${matcher}"
for match in "${matches[@]}"; do
echo "MATCH(${message_type}): ${match}"
if ! echo "$OUTPUT" | grep -q "$match"; then
continue
fi
Expand All @@ -85,3 +78,5 @@ runs:
exit 1
fi
shell: bash
env:
INPUT_ENV: ${{ inputs.env }}

0 comments on commit 2b6c4bc

Please sign in to comment.