Skip to content

Add workflows permission #11

Add workflows permission

Add workflows permission #11

Workflow file for this run

name: CI
on: push
permissions:
contents: write
workflows: write

Check failure on line 6 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yaml (Line: 6, Col: 3): Unexpected value 'workflows'
jobs:
lintfix:
name: Lint and fix
runs-on: ubuntu-latest
steps:
- name: πŸš€ Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: 🎯 Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: πŸ—οΈ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: πŸ“¦ Setup pnpm - Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: false
- name: πŸ“¦ Setup pnpm - Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: πŸ“¦ Setup pnpm - Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: πŸ“¦ Install dependencies
run: pnpm install
- name: πŸ”¦ Run lint
run: pnpm lint --fix
- name: πŸ–ŒοΈ Run format
run: pnpm format
- name: 🍾 Commit & Push changes
uses: ad-m/github-push-action@master
with:
message: 'chore: Auto-fix lint errors'
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}