From 6a1a5928dc13a21357d6fd02dfb7a9770bb7f683 Mon Sep 17 00:00:00 2001 From: Thalia Archibald Date: Mon, 2 Dec 2024 20:37:45 -0800 Subject: [PATCH] Fix backslash escaping in heredoc --- .github/workflows/main.yml | 8 +++++++- src/dot.github.workflows.main.yml.gen.rb | 12 ++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 631ac9e..c945709 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -148,7 +148,13 @@ jobs: sudo docker cp qr:/usr/local/share/quine-relay/QR.rexx spoiler/ cd spoiler git add . - GIT_AUTHOR_NAME="$(git show -s --format=%an "$GITHUB_SHA")" GIT_AUTHOR_EMAIL="$(git show -s --format=%ae "$GITHUB_SHA")" GIT_AUTHOR_DATE="$(git show -s --format=%ad "$GITHUB_SHA")" GIT_COMMITTER_NAME='GitHub Actions' GIT_COMMITTER_EMAIL='actions@github.com' TZ=UTC git commit --allow-empty -m "spoiler: $(git show -s --format=%s "$GITHUB_SHA")" + GIT_AUTHOR_NAME="$(git show -s --format=%an "$GITHUB_SHA")" \ + GIT_AUTHOR_EMAIL="$(git show -s --format=%ae "$GITHUB_SHA")" \ + GIT_AUTHOR_DATE="$(git show -s --format=%ad "$GITHUB_SHA")" \ + GIT_COMMITTER_NAME='GitHub Actions' \ + GIT_COMMITTER_EMAIL='actions@github.com' \ + TZ=UTC \ + git commit --allow-empty -m "spoiler: $(git show -s --format=%s "$GITHUB_SHA")" git push --quiet origin spoiler echo The intermediate sources are available: https://github.com/${GITHUB_REPOSITORY}/tree/spoiler if: github.event_name == 'push' && github.ref == 'refs/heads/master' diff --git a/src/dot.github.workflows.main.yml.gen.rb b/src/dot.github.workflows.main.yml.gen.rb index 88a12db..4491711 100644 --- a/src/dot.github.workflows.main.yml.gen.rb +++ b/src/dot.github.workflows.main.yml.gen.rb @@ -35,12 +35,12 @@ #{ cp_cmds } cd spoiler git add . - GIT_AUTHOR_NAME="$(git show -s --format=%an "$GITHUB_SHA")" \ - GIT_AUTHOR_EMAIL="$(git show -s --format=%ae "$GITHUB_SHA")" \ - GIT_AUTHOR_DATE="$(git show -s --format=%ad "$GITHUB_SHA")" \ - GIT_COMMITTER_NAME='GitHub Actions' \ - GIT_COMMITTER_EMAIL='actions@github.com' \ - TZ=UTC \ + GIT_AUTHOR_NAME="$(git show -s --format=%an "$GITHUB_SHA")" \\ + GIT_AUTHOR_EMAIL="$(git show -s --format=%ae "$GITHUB_SHA")" \\ + GIT_AUTHOR_DATE="$(git show -s --format=%ad "$GITHUB_SHA")" \\ + GIT_COMMITTER_NAME='GitHub Actions' \\ + GIT_COMMITTER_EMAIL='actions@github.com' \\ + TZ=UTC \\ git commit --allow-empty -m "spoiler: $(git show -s --format=%s "$GITHUB_SHA")" git push --quiet origin spoiler echo The intermediate sources are available: https://github.com/${GITHUB_REPOSITORY}/tree/spoiler