Skip to content

Merge branch 'main' of https://github.com/2nikhiltom/carbon #10

Merge branch 'main' of https://github.com/2nikhiltom/carbon

Merge branch 'main' of https://github.com/2nikhiltom/carbon #10

name: Sync generated files
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Use Node.js 20.x
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 #v4.0.2
with:
node-version: '20.x'
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Build project
run: yarn build
- name: Sync project dependency files
run: yarn sync
- name: Push generated artifacts to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Our git status is not clean. Checking in the following files:";
echo "$(git status --porcelain)";
git config --global credential.helper 'cache --timeout=120'
git config --global user.email "carbon@us.ibm.com"
git config --global user.name "carbon-bot"
git remote set-url origin "https://x-access-token:$GITHUB_TOKEN@github.com/carbon-design-system/carbon.git"
git checkout main
git add -A
git commit -m "chore(project): sync generated files"
git push
fi