diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 1e29d46..bcfc425 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -12,19 +12,27 @@ jobs: strategy: matrix: - node-version: [21.x] + node-version: [20.x] steps: - name: ๐Ÿ”„ Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: ๐Ÿ”ง Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: ๐Ÿ“ฆ Install dependencies run: npm ci - - name: ๐Ÿ–‹๏ธ Check formatting - run: npx prettier --check . + - name: ๐Ÿ–‹๏ธ Check formatting + run: | + npx prettier --check . || ( + echo "Formatting issues detected. Running Prettier to fix..." && + npx prettier --write . && + git config --local user.name "Debugging Duck ๐Ÿฆ†" && + git config --local user.email "github-actions[bot]@users.noreply.github.com" && + git add . && + git commit -m "๐Ÿ’„ Fix formatting issues with Prettier" || echo "No changes to commit." + ) - name: ๐Ÿงน Lint code run: npm run lint - name: ๐Ÿงช Run tests with coverage diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bcb13fa..6173fb1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,12 +10,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code ๐Ÿ“ฅ - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Node.js ๐Ÿ› ๏ธ - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: - node-version: '21' + node-version: '20' - name: Install dependencies ๐Ÿ“ฆ๐Ÿš€ run: npm install diff --git a/.github/workflows/npm-update.yml b/.github/workflows/npm-update.yml index 0244f88..60d3753 100644 --- a/.github/workflows/npm-update.yml +++ b/.github/workflows/npm-update.yml @@ -8,6 +8,9 @@ on: branches: - main # Runs on pushes to the main branch +permissions: + contents: write + jobs: update-and-scan: runs-on: ubuntu-latest