Bump @department-of-veterans-affairs/css-library from 0.7.0 to 0.8.4 in /packages/tokens #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check for token changes | |
on: | |
pull_request: | |
types: [opened, edited] | |
defaults: | |
run: | |
working-directory: packages/tokens | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
jobs: | |
compare-tokens: | |
if: contains(github.event.pull_request.head.ref, 'dependabot/npm_and_yarn/packages/tokens/department-of-veterans-affairs/css-library') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
fetch-depth: 0 | |
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 | |
run: | | |
cd dist/js | |
cp colors.js colors_new.js | |
git checkout main | |
yarn && yarn tokens:build | |
if diff -q colors.js colors_new.js > /dev/null; then | |
echo "Files have the same contents." | |
echo "TOKENS_CHANGED=false" >> $GITHUB_ENV | |
else | |
echo "Files have different contents." | |
echo "TOKENS_CHANGED=true" >> $GITHUB_ENV | |
fi | |
- name: Send slack message | |
id: slack | |
uses: slackapi/[email protected] | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_OAUTH_TOKEN }} | |
with: | |
channel-id: C062TM03HN2 # DSVA #va-mobile-library-alerts channel | |
payload: | | |
{ | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": "Dependabot found an update to *@department-of-veterans-affairs/css-library*" | |
} | |
}, | |
{ | |
"type": "context", | |
"elements": [ | |
{ | |
"type": "mrkdwn", | |
"text": "<${{ github.event.pull_request.html_url }}|Pull Request>" | |
}, | |
{ | |
"type": "mrkdwn", | |
"text": "*Tokens changed:* ${{ env.TOKENS_CHANGED }}" | |
} | |
] | |
} | |
], | |
"unfurl_links": false, | |
"unfurl_media": false | |
} |