Skip to content

Commit

Permalink
fix: Fix rollback by git revert
Browse files Browse the repository at this point in the history
  • Loading branch information
yeha98555 committed Jun 17, 2023
1 parent 7824f57 commit c2ed013
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Deploy to Render
on:
push:
branches:
- main
- develop
- fix/github-actions-rollback

jobs:
test:
Expand All @@ -31,7 +30,8 @@ jobs:
- name: Rollback
if: ${{ failure() && github.event_name == 'push' }}
run: |
git checkout ${{ github.sha }}^1
MERGE_COMMIT_SHA=$(git log --merges --pretty=format:"%H" -1)
git revert -m 1 $MERGE_COMMIT_SHA
git push --force
# Post a comment on the pull request
Expand Down

0 comments on commit c2ed013

Please sign in to comment.