Skip to content

Commit

Permalink
gh-actions/github/run: Revert command mangling and add debugging (#932
Browse files Browse the repository at this point in the history
)

Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax authored Nov 4, 2023
1 parent 0820273 commit 9e8cdcd
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 16 deletions.
6 changes: 3 additions & 3 deletions gh-actions/docker/cache/prime/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ outputs:
runs:
using: "composite"
steps:
- uses: envoyproxy/toolshed/gh-actions/appauth@actions-v0.1.9
- uses: envoyproxy/toolshed/gh-actions/appauth@actions-v0.1.10
if: ${{ inputs.lock-app-id && inputs.lock-app-key }}
name: Fetch app auth
id: appauth
with:
app_id: ${{ inputs.lock-app-id }}
key: ${{ inputs.lock-app-key }}
- uses: envoyproxy/toolshed/gh-actions/github/mutex@actions-v0.1.9
- uses: envoyproxy/toolshed/gh-actions/github/mutex@actions-v0.1.10
if: ${{ steps.appauth.outputs.token || inputs.lock-token }}
with:
key: ${{ inputs.lock-id || inputs.image_tag }}
repository: ${{ inputs.lock-repository }}
token: ${{ steps.appauth.outputs.token || inputs.lock-token }}
- uses: envoyproxy/toolshed/gh-actions/cache/prime@actions-v0.1.9
- uses: envoyproxy/toolshed/gh-actions/cache/prime@actions-v0.1.10
id: prime
with:
key: "${{ inputs.image_tag }}"
Expand Down
2 changes: 1 addition & 1 deletion gh-actions/docker/cache/restore/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: envoyproxy/toolshed/gh-actions/cache/restore@actions-v0.1.9
- uses: envoyproxy/toolshed/gh-actions/cache/restore@actions-v0.1.10
with:
key: ${{ inputs.image_tag }}
command: |
Expand Down
2 changes: 1 addition & 1 deletion gh-actions/docker/fetch/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: envoyproxy/toolshed/gh-actions/fetch@actions-v0.1.9
- uses: envoyproxy/toolshed/gh-actions/fetch@actions-v0.1.10
id: fetch
with:
url: ${{ inputs.url }}
Expand Down
6 changes: 3 additions & 3 deletions gh-actions/docker/shas/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ outputs:
runs:
using: composite
steps:
- uses: envoyproxy/toolshed/gh-actions/yaml/tojson@actions-v0.1.9
- uses: envoyproxy/toolshed/gh-actions/yaml/tojson@actions-v0.1.10
id: yaml
with:
yaml: ${{ inputs.images }}
- uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.1.9
- uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.1.10
id: json_actions
with:
input: ${{ steps.yaml.outputs.json }}
filter: |
{runs: {using: "composite", steps: [to_entries[] | {
uses: "envoyproxy/toolshed/gh-actions/docker/sha@actions-v0.1.9",
uses: "envoyproxy/toolshed/gh-actions/docker/sha@actions-v0.1.10",
id: .key,
with: {
image: .value,
Expand Down
6 changes: 3 additions & 3 deletions gh-actions/github/checkout/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ runs:
steps:
- name: Fetch token for app auth
id: appauth
uses: envoyproxy/toolshed/gh-actions/appauth@actions-v0.1.9
uses: envoyproxy/toolshed/gh-actions/appauth@actions-v0.1.10
if: ${{ inputs.app_id && inputs.app_key }}
with:
app_id: ${{ inputs.app_id }}
key: ${{ inputs.app_key }}
- name: Parse YAML config
id: parsed
uses: envoyproxy/toolshed/gh-actions/yaml/tojson@actions-v0.1.9
uses: envoyproxy/toolshed/gh-actions/yaml/tojson@actions-v0.1.10
with:
yaml: ${{ inputs.config || '{}' }}
- name: Add auth token to config
id: config
if: ${{ steps.appauth.outputs.token }}
uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.1.9
uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.1.10
with:
input: ${{ steps.parsed.outputs.json }}
filter: |
Expand Down
2 changes: 1 addition & 1 deletion gh-actions/github/merge-commit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
shell: bash
env:
URL: https://api.github.com/repos/${{ inputs.repository }}/pulls/${{ inputs.pr }}
- uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.1.9
- uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.1.10
id: jq
with:
input: ${{ steps.fetch.outputs.response }}
Expand Down
2 changes: 1 addition & 1 deletion gh-actions/github/pr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ runs:
working-directory: ${{ inputs.working-directory }}
shell: bash
- name: Upload diff
uses: envoyproxy/toolshed/gh-actions/upload/diff@actions-v0.1.9
uses: envoyproxy/toolshed/gh-actions/upload/diff@actions-v0.1.10
if: ${{ inputs.diff-upload }}
with:
diff: HEAD^1
Expand Down
5 changes: 4 additions & 1 deletion gh-actions/github/run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,16 @@ runs:
COMMAND+=(${{ inputs.container-command }})
fi
if [[ -n "${{ inputs.container-command }}" && -n "${{ inputs.command-prefix }}" ]]; then
COMMAND+=(bash -c '${{ inputs.command-prefix }} ${{ inputs.command }}')
COMMAND+=('${{ inputs.command-prefix }} ${{ inputs.command }}')
else
COMMAND+=(
${{ inputs.command-prefix }}
${{ inputs.command }})
fi
TMP_OUTPUT=$(mktemp)
if [[ -n "$RUNNER_DEBUG" || -n "$CI_DEBUG" ]]; then
echo "DEBUG: RUN ${COMMAND[*]}" >&2
fi
"${COMMAND[@]}" 2> >(tee "$TMP_OUTPUT") || {
FAILED=true
}
Expand Down
2 changes: 1 addition & 1 deletion gh-actions/json/table/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ outputs:
runs:
using: composite
steps:
- uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.1.9
- uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.1.10
name: Generate table
id: table
with:
Expand Down
2 changes: 1 addition & 1 deletion gh-actions/using/recurse/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
steps:
# .tmp.action/action.yml **must** be hardcoded

- uses: envoyproxy/toolshed/gh-actions/yaml/tojson@actions-v0.1.9
- uses: envoyproxy/toolshed/gh-actions/yaml/tojson@actions-v0.1.10
id: yaml
with:
yaml: ${{ inputs.with }}
Expand Down

0 comments on commit 9e8cdcd

Please sign in to comment.