Something went wrong. Try again.
Fork of Chiri for Astro for my blog forked from quillmatiq.com/augment
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127name: CI
on: push: branches: [main] paths-ignore: &paths-ignore - 'LICENSE' - '.gitignore' - '**/*.md' - '**/*.png' - '**/*.jpg' - '**/*.jpeg' - '**/*.gif' - '**/*.webp' - '**/*.svg' pull_request: branches: [main] paths-ignore: *paths-ignore
concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true
permissions: contents: write pull-requests: write checks: read
jobs: validate: name: Validate & Build runs-on: ubuntu-latest
steps: - name: Checkout code uses: actions/checkout@v6
- name: Install pnpm uses: pnpm/action-setup@v4 with: version: latest
- name: Setup Node.js uses: actions/setup-node@v6 with: node-version: 'lts/*' cache: 'pnpm'
- name: Install dependencies run: pnpm install --frozen-lockfile --prefer-offline
- name: Format check run: pnpm format:check continue-on-error: true
- name: Lint run: pnpm lint continue-on-error: true
- name: Type check run: tsc --noEmit
- name: Build run: pnpm build
- name: Upload build artifacts uses: actions/upload-artifact@v6 with: name: dist path: dist/ retention-days: 7
auto-merge: name: Auto Merge runs-on: ubuntu-latest needs: validate if: > github.event_name == 'pull_request' && github.event.pull_request.draft == false && ( github.actor == 'dependabot[bot]' || contains(github.event.pull_request.labels.*.name, 'automerge') )
steps: - name: Checkout code uses: actions/checkout@v6 with: token: ${{ secrets.GITHUB_TOKEN }}
- name: Auto approve uses: hmarr/auto-approve-action@v4 with: github-token: ${{ secrets.GITHUB_TOKEN }} pull-request-number: ${{ github.event.pull_request.number }}
- name: Wait for all checks to complete uses: fountainhead/action-wait-for-check@v1.2.0 id: wait-for-checks with: token: ${{ secrets.GITHUB_TOKEN }} checkName: 'Validate & Build' ref: ${{ github.event.pull_request.head.sha || github.sha }} timeoutSeconds: 600 intervalSeconds: 10
- name: Auto merge if: steps.wait-for-checks.outputs.conclusion == 'success' uses: actions/github-script@v8 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const { data: pullRequest } = await github.rest.pulls.get({ owner: context.repo.owner, repo: context.repo.repo, pull_number: context.issue.number });
await github.rest.pulls.merge({ owner: context.repo.owner, repo: context.repo.repo, pull_number: context.issue.number, merge_method: 'squash', commit_title: pullRequest.title, commit_message: pullRequest.body || '' });