Skip to content

Commit

Permalink
Wrap git commit yarn.lock in conditional. Final test
Browse files Browse the repository at this point in the history
  • Loading branch information
narin committed Jul 3, 2024
1 parent 2b79593 commit 2bc355c
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/tokens-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,20 @@ jobs:
token: ${{ secrets.VA_MOBILE_ROBOT_GITHUB_PAT }}
- name: Set git credentials and regenerate yarn.lock
run: |
git status
git config --global user.name 'VA Automation Bot'
git config --global user.email '[email protected]'
yarn && yarn tokens:build
cd ../..
git add yarn.lock
git commit -m 'Regenerate yarn.lock'
git push
- name: Compare tokens
yarn install
if git status --porcelain | grep -q '^[ MARC].*yarn.lock'; then
echo "yarn.lock has unstaged changes."
cd ../..
git add yarn.lock
git commit -m 'Regenerate yarn.lock'
git push
fi
- name: Build and compare tokens
run: |
yarn tokens:build
cd dist/js
cp colors.js colors_new.js
git checkout main
Expand All @@ -60,7 +64,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Dependabot found an update to *@department-of-veterans-affairs/css-library*"
"text": "*TEST* Dependabot found an update to *@department-of-veterans-affairs/css-library*"
}
},
{
Expand Down

0 comments on commit 2bc355c

Please sign in to comment.