Sentry: drop unused import #4347
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: Format | |
on: | |
push: | |
branches-ignore: | |
- 'main' | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.ACTION_PAT }} | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Setup and cache pnpm | |
uses: ./.github/actions/pnpm-setup | |
- name: Install workspaces | |
env: | |
VERDACCIO_AUTH_TOKEN: ${{ secrets.VERDACCIO_AUTH_TOKEN }} | |
run: pnpm install | |
- name: Run Prettier | |
run: pnpm format | |
- name: Detect diff | |
id: detect-diff | |
run: | | |
if [ ! -z "$(git status --short)" ]; then | |
echo "HAS_DIFF=true" >> $GITHUB_OUTPUT | |
else | |
echo "HAS_DIFF=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Fail if Dependabot | |
if: steps.detect-diff.outputs.HAS_DIFF == 'true' && github.actor == 'dependabot[bot]' | |
run: exit 1 | |
- name: Commit changes | |
if: steps.detect-diff.outputs.HAS_DIFF == 'true' | |
run: | | |
git fetch --depth=1 origin "$GITHUB_REF_NAME" | |
git stash | |
git checkout "$GITHUB_REF_NAME" | |
git stash pop | |
git config user.name "github-actions[bot]" | |
git config user.email "<41898282+github-actions[bot]@users.noreply.github.com>" | |
git add . | |
git commit -m "style: apply prettier formatting diff" | |
git push |