Skip to content

Commit

Permalink
Create check-version-change.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
noifuji committed Jan 30, 2024
1 parent d2f68fb commit 10808bb
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/check-version-change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Checkout Previous Version

on:
push:
branches:
- main

jobs:
checkout_previous_version:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Get previous commit SHA
run: |
PREVIOUS_COMMIT=$(git rev-parse HEAD^)
echo "Previous commit SHA: $PREVIOUS_COMMIT"
- name: Checkout previous version
run: |
git checkout $PREVIOUS_COMMIT

0 comments on commit 10808bb

Please sign in to comment.