diff --git a/.github/workflows/tokens-pr.yml b/.github/workflows/tokens-pr.yml index b11702ea..a9603012 100644 --- a/.github/workflows/tokens-pr.yml +++ b/.github/workflows/tokens-pr.yml @@ -21,12 +21,18 @@ jobs: - name: Generate tokens files run: melos gen_theme + - name: Check if tailor file was changed + id: tailor_changed + run: git status --porcelain | grep -q 'tailor.dart' + continue-on-error: true + - name: Commit changes + if: steps.tailor_changed.outcome == 'success' run: | git config --local user.email "tech.account@mewssystems.com" git config --local user.name "mews-tech" - git add . + git add optimus/lib/src/theme/optimus_tokens.tailor.dart git commit -m "Update generated files" git push origin ${{ github.ref_name }} @@ -38,7 +44,6 @@ jobs: --base master \ --head ${{ github.ref_name }} \ --title 'feat: Design Tokens Update' \ - --body 'Design Tokens were updated! This PR was created to update the code.' \ - --reviewer witwash + --body 'Design Tokens were updated! This PR was created to update the code.' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}