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

Keep spoiler history instead of force-pushing #148

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
sudo docker run --privileged --name qr -e CI=true -t quine-relay
- name: push spoiler
run: |
mkdir spoiler
git clone https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git spoiler --branch spoiler
git -C spoiler rm --quiet -r '*'
sudo docker cp qr:/usr/local/share/quine-relay/QR.rb spoiler/
sudo docker cp qr:/usr/local/share/quine-relay/QR.rs spoiler/
sudo docker cp qr:/usr/local/share/quine-relay/QR.scala spoiler/
Expand Down Expand Up @@ -146,13 +147,16 @@ jobs:
sudo docker cp qr:/usr/local/share/quine-relay/QR.rc spoiler/
sudo docker cp qr:/usr/local/share/quine-relay/QR.rexx spoiler/
cd spoiler
git init --quiet
git config user.name 'Yusuke Endoh'
git config user.email '[email protected]'
git add .
git commit -m spoiler --quiet
git push --force --quiet https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/mame/quine-relay.git master:spoiler
echo The intermediate sources are available: https://github.com/mame/quine-relay/tree/spoiler
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='[email protected]' \
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'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 11 additions & 7 deletions src/dot.github.workflows.main.yml.gen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,20 @@
sudo docker run --privileged --name qr -e CI=true -t quine-relay
- name: push spoiler
run: |
mkdir spoiler
git clone https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git spoiler --branch spoiler
git -C spoiler rm --quiet -r '*'
#{ cp_cmds }
cd spoiler
git init --quiet
git config user.name 'Yusuke Endoh'
git config user.email '[email protected]'
git add .
git commit -m spoiler --quiet
git push --force --quiet https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/mame/quine-relay.git master:spoiler
echo The intermediate sources are available: https://github.com/mame/quine-relay/tree/spoiler
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='[email protected]' \
mame marked this conversation as resolved.
Show resolved Hide resolved
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'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down