name: Continous Integration on: pull_request: permissions: pull-requests: write contents: write jobs: build: name: 'Build 📦' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Cache uses: actions/cache@v3 with: path: | **/public **/.cache key: cache - name: Use Node.js uses: actions/setup-node@v3 with: node-version: 16.x cache: 'npm' - run: npm ci - run: npm run lint - run: npm run build --if-present - run: npm run test dependabot: name: 'Dependabot' needs: [build] runs-on: ubuntu-latest if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} steps: - name: Dependabot metadata id: metadata uses: dependabot/fetch-metadata@v1.3.6 with: github-token: '${{ secrets.GITHUB_TOKEN }}' - name: Enable auto-merge for Dependabot PRs run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}