Adjust borders/shadows for Button component #1728
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
# Posts a comment listing all the variables that changed in a PR | |
name: Show diff for design token changes | |
on: | |
pull_request: | |
branches-ignore: | |
- 'changeset-release/**' | |
jobs: | |
comment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- name: Create comment (if necessary) | |
uses: actions/github-script@v5 | |
with: | |
script: | | |
const body = '<details>\n' + | |
'<summary><strong>Variables changed</strong></summary>\n\n' + | |
'<!-- diff --><!-- /diff -->\n' + | |
'</details>' | |
const result = await github.rest.issues.listComments({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo | |
}); | |
console.log(result.data) | |
const botComments = result.data.filter(c => c.user.login === 'github-actions[bot]') | |
if (!botComments.length) { | |
await github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body | |
}) | |
} | |
diff: | |
needs: comment | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Checkout base branch | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.base_ref }} | |
path: base | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci --no-audit --no-fund --include=dev --ignore-scripts | |
- name: Build tokens | |
run: npm run build | |
- name: Build experimental tokens | |
run: npm run build:tokens | |
- name: Install dependencies (base) | |
run: pushd base; npm i --no-audit --no-fund --ignore-scripts; popd | |
- name: Build (base) | |
run: pushd base; npm run build; popd | |
- name: Build (base experimental) | |
run: pushd base; npm run build:tokens; popd | |
- name: Diff | |
uses: primer/comment-token-update@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USER: github-actions[bot] | |
with: | |
# This action will find the first comment by `github-actions[bot]` and | |
# insert the diff data if `<!-- diff --><!-- /diff -->` is present in that comment. | |
# If there are multiple comments by `github-actions[bot]` | |
# or if `<!-- diff --><!-- /diff -->` is missing, | |
# this action may not work as expected. | |
comment-token: 'diff' | |
script: | | |
diff=$(for file in dist/scss/**/*.scss | |
do | |
# using `2> /dev/null || true` here to suppress errors because, | |
# in this case, differences are not errors | |
diff -U 1 base/$file $file 2> /dev/null || true | |
done) | |
echo "" | |
echo "\`\`\`diff" | |
if [[ $diff ]] | |
then | |
echo "$diff" | |
else | |
echo "No variables changed" | |
fi | |
echo "\`\`\`" |