Skip to content

Commit

Permalink
🐛 Fix release pipeline. (#17)
Browse files Browse the repository at this point in the history
GitHub workflows' `set-output` command uses the OS's EOL character for
ending the capture, which means `\n` characters must be replaced with
something else. The community wisdom is `%0A`; see actions/toolkit#403.

The `${{ github.repository }}` expression's `/` delimiter conflicts with
the `sed` delimiter; avoid this by changing the `sed` delimiter to `#`.
  • Loading branch information
theipster authored Dec 28, 2020
1 parent d5e2389 commit df0a38c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
echo "Parsing deployment tags..."
tags=$(seq 3 | tac | xargs -i sh -c "echo $semver | cut -d . -f -{}")
echo "$tags" | sed 's/\(.*\)/ - \1/'
echo "::set-output name=tags::$tags"
echo "::set-output name=tags::${tags//$'\n'/'%0A'}"
distribute-images:
env:
Expand All @@ -50,8 +50,8 @@ jobs:
- name: CI publish (semver only)
run: |
echo "${{ env.TAGS }}" | \
sed 's/\(.*\)/${{ env.CI_REGISTRY }}\/${{ github.repository }}:\1/' | \
sed 's/\(.*\)/docker tag ${{ env.SOURCE_IMAGE }} \1; docker push \1/' | \
sed 's#\(.*\)#${{ env.CI_REGISTRY }}/${{ github.repository }}:\1#' | \
sed 's#\(.*\)#docker tag ${{ env.SOURCE_IMAGE }} \1; docker push \1#' | \
sh
- name: DockerHub login
Expand All @@ -62,8 +62,8 @@ jobs:
- name: DockerHub publish (semver and latest)
run: |
echo -e "${{ env.TAGS }}\nlatest" | \
sed 's/\(.*\)/${{ github.repository }}:\1/' | \
sed 's/\(.*\)/docker tag ${{ env.SOURCE_IMAGE }} \1; docker push \1/' | \
sed 's#\(.*\)#${{ github.repository }}:\1#' | \
sed 's#\(.*\)#docker tag ${{ env.SOURCE_IMAGE }} \1; docker push \1#' | \
sh
create-release:
Expand Down

0 comments on commit df0a38c

Please sign in to comment.