Skip to content

Commit 5dbd302

Browse files
Merge pull request #917 from Availity/fix/deploy-job
Fix/deploy job
2 parents 6c1f29b + 66da79f commit 5dbd302

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ jobs:
6666
if: "${{!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'Release: Version Updates')}}"
6767
needs: [setup]
6868
runs-on: ubuntu-latest
69+
outputs:
70+
has_changes: ${{ steps.changes.outputs.has_changes }}
6971
permissions:
7072
contents: write # Required for git push and creating tags
7173
pull-requests: write # Required for creating pull requests
@@ -99,8 +101,10 @@ jobs:
99101
yarn config set npmAuthToken "${{ secrets.NPM_TOKEN }}"
100102
git config user.email ${{ secrets.GH_EMAIL }}
101103
git config user.name ${{ secrets.GH_USER }}
102-
# Reset .yarnrc.yml to prevent committing
103-
git checkout -- .yarnrc.yml
104+
105+
- name: Store initial commit SHA
106+
id: initial-sha
107+
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
104108

105109
- name: Version Packages
106110
run: |
@@ -109,10 +113,14 @@ jobs:
109113
- name: Check for Version Changes
110114
id: changes
111115
run: |
112-
if [ "$(git rev-list --count HEAD^..HEAD)" -eq 0 ]; then
116+
INITIAL_SHA="${{ steps.initial-sha.outputs.sha }}"
117+
CURRENT_SHA=$(git rev-parse HEAD)
118+
if [ "$INITIAL_SHA" = "$CURRENT_SHA" ]; then
113119
echo "has_changes=false" >> $GITHUB_OUTPUT
120+
echo "No new commits created by version step"
114121
else
115122
echo "has_changes=true" >> $GITHUB_OUTPUT
123+
echo "New commits created by version step"
116124
fi
117125
118126
- name: Publish

0 commit comments

Comments
 (0)