Skip to content

Bump @department-of-veterans-affairs/css-library from 0.7.0 to 0.8.4 in /packages/tokens #21

Bump @department-of-veterans-affairs/css-library from 0.7.0 to 0.8.4 in /packages/tokens

Bump @department-of-veterans-affairs/css-library from 0.7.0 to 0.8.4 in /packages/tokens #21

Workflow file for this run

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:
fetch-depth: 0
token: ${{ secrets.VA_MOBILE_ROBOT_GITHUB_PAT }}
- name: Set git credentials and regenerate yarn.lock
run: |
git config --global user.name 'VA Automation Bot'
git config --global user.email '[email protected]'
yarn && yarn tokens:build
cd ../..
git add .
git commit -m 'Regenerate yarn.lock'
git push origin HEAD:${{ github.event.pull_request.head.ref }}
- 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": "*TEST* Dependabot found an update to *@department-of-veterans-affairs/css-library*"
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "*Tokens changed:* ${{ env.TOKENS_CHANGED }}"
},
{
"type": "mrkdwn",
"text": "<${{ github.event.pull_request.html_url }}|Pull Request>"
}
]
}
],
"unfurl_links": false,
"unfurl_media": false
}