Skip to content

Commit

Permalink
ci: workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tutods committed Oct 23, 2024
1 parent 1035710 commit b11e36e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 64 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Biome Migration
name: Additional fixs

permissions:
contents: write
Expand All @@ -8,11 +8,54 @@ env:
LEFTHOOK: 0
CI: true

on:
pull_request:
types: [opened, edited, synchronize]
on: pull_request

jobs:
lint:
name: ✍️ Fix lint errors
runs-on: ubuntu-latest
if: contains(github.event.pull_request.title, 'ci(changesets)')

steps:
- name: 🦖 Cancel Previous Runs
uses: styfle/[email protected]

- name: 🔻 Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🏃 Run Node and NPM setup
uses: ./.github/actions/setup-project

- name: "✍️ Lint: fix errors"
id: migration
run: |
pnpm lint:fix
# Check for changes
if git diff --name-only --exit-code; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
- name: 💭 Get current branch name
id: get_branch
if: ${{ steps.migration.outputs.has_changes == 'true' }}
run: echo "BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT

- name: 📥 Checkout current branch
if: ${{ steps.migration.outputs.has_changes == 'true' }}
run: git checkout ${{ steps.get_branch.outputs.BRANCH_NAME }}

- name: 📤 Commit changes
if: ${{ steps.migration.outputs.has_changes == 'true' }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "fix(lint): safe errors" || echo "No changes to commit"
git push
biome-migration:
name: ✍️ Migrate Biome
runs-on: ubuntu-latest
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/lint-ci-prs.yaml

This file was deleted.

0 comments on commit b11e36e

Please sign in to comment.