We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 789c2cd commit f70435eCopy full SHA for f70435e
.github/workflows/gempush.yml
@@ -14,11 +14,18 @@ jobs:
14
15
steps:
16
- uses: actions/checkout@master
17
+ with:
18
+ fetch-depth: 2
19
20
- name: Check if version.rb has changed
21
id: version_check
22
run: |
- if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q "^lib/coaster/version.rb$"; then
23
+ PREV_COMMIT=${{ github.event.before }}
24
+ if [ -z "$PREV_COMMIT" ] || [ "$PREV_COMMIT" == "0000000000000000000000000000000000000000" ]; then
25
+ PREV_COMMIT=$(git rev-parse HEAD~1)
26
+ fi
27
+
28
+ if git diff --name-only $PREV_COMMIT ${{ github.sha }} | grep -q "^lib/coaster/version.rb$"; then
29
echo "VERSION_CHANGED=true" >> $GITHUB_ENV
30
else
31
echo "VERSION_CHANGED=false" >> $GITHUB_ENV
0 commit comments