Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with ubuntu-18.04 runner #7

Merged
merged 1 commit into from
Apr 10, 2021
Merged

Conversation

cbandy
Copy link
Contributor

@cbandy cbandy commented Mar 3, 2021

When I ran this action in the following matrix, both jobs failed with the jq help text, jq - commandline JSON processor [version 1.5-1-a5b5cbe], followed by head: write error: Broken pipe.

  kubernetes-k3d:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        kubernetes: [latest, v1.18]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v2
        with: { go-version: 1.x }
      - uses: nolar/setup-k3d-k3s@v1
        with:
          version: ${{ matrix.kubernetes }}
          k3d-args: --no-lb

This PR fixes two things:

  1. Every invocation of jq has a filter. The default of . came about in 1.6, apparently.
  2. No more pipes. The GH bash runner enables pipefail but now the action behaves consistently without it.

Along the way, I replaced the temporary files with variables and here strings. Tested on Bash 3.2.57 (macOS Big Sur) and Bash 5.0.3 (debian buster).

Each process substitution is now a single command with no pipes, so one
failure stops the script.

Tested on Bash 3.2.57 (macOS Big Sur) and Bash 5.0.3 (debian buster).

Signed-off-by: Chris Bandy <bandy.chris@gmail.com>
action.sh Show resolved Hide resolved
@cbandy cbandy changed the title Use Bash here strings rather than temporary files Compatibility with ubuntu-18.04 runner Mar 3, 2021
@cbandy
Copy link
Contributor Author

cbandy commented Apr 8, 2021

@nolar is there anything I can do to help with this? Thanks for looking.

@nolar
Copy link
Owner

nolar commented Apr 8, 2021

I am terribly sorry for the one-month delay. This PR somehow slipped through my hands and I did't noticed it. I'll take a look now. Thanks for pinging me.

action.sh Show resolved Hide resolved
action.sh Show resolved Hide resolved
@nolar nolar merged commit faab498 into nolar:v1 Apr 10, 2021
@nolar
Copy link
Owner

nolar commented Apr 10, 2021

Released as v1.0.4 and v1 (a moving ref).

Thanks for this contribution!

@cbandy cbandy deleted the here-strings branch April 10, 2021 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants