solvaholic / octodns-sync

GitHub Action to test and deploy DNS settings with OctoDNS
MIT License
28 stars 14 forks source link

Rewrite release workflow #73

Closed solvaholic closed 3 years ago

solvaholic commented 3 years ago

Objectives of these changes are:

733af29 accommodates an excessively long line resulting from where I put credentials for the tag create/push work.

See also #64 and #55

solvaholic commented 3 years ago

Woohoo! Test run of release.yml made it most of the way through. All the way up to here:

image

I'll try single-quoting the JSON in the step output, per https://github.community/t/output-json-string-from-one-action-and-use-it-in-a-workflow-step

solvaholic commented 3 years ago

Those single-quotes got to the same complaint and exit code 127.

fromJSON() returned, as documented, an object:

_data="Object"

toJSON(fromJSON()) got 127 again with a different looking error:

/home/runner/work/_temp/99e3050c-5daa-4901-8d66-287dd3299a3f.sh: line 4: $'v2.3.0,\n body: words': command not found Error: Process completed with exit code 127.

What's that \n doing in there? Anyway I think whatever's going on in there loses some ".

I feel like it really shouldn't be this complicated to send a JSON blob to an API call, so I assume I'm holding it wrong.

I'll poke this a bit longer before I cut bait and shop for a 3rd party Action to draft the release.

solvaholic commented 3 years ago

OK, it was just the quotes.

Because the expression expands before bash gets a hold of it, wrap the expression in ' so bash'll treat it like one string:

          _data='${{ steps.get-data.outputs.data }}'