diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a2f71b73..51928d7b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,28 +1,41 @@ version: 2 +registries: + npm-github: + type: npm-registry + url: https://npm.pkg.github.com + token: ${{ secrets.GH_TOKEN }} + git-github: + type: git + url: https://github.com + username: x-access-token + password: '${{ secrets.GH_TOKEN }}' + updates: - package-ecosystem: npm - registries: - - gh-packages - directory: '/' schedule: interval: weekly - versioning-strategy: increase - allow: - - dependency-name: '@typeform*' - commit-message: - prefix: 'chore' - include: 'scope' - labels: - - 'dependabot' + day: monday groups: - typeform: + dependencies: patterns: - - '@typeform*' - -registries: - gh-packages: - type: npm-registry - url: https://npm.pkg.github.com - token: ${{ secrets.GH_TOKEN }} + - "*" + directories: + - "/" + commit-message: + prefix: fix(dependabot) + registries: + - npm-github + - git-github + - package-ecosystem: github-actions + schedule: + interval: weekly + day: monday + groups: + dependencies: + patterns: + - "*" + directory: "/" + commit-message: + prefix: build(dependabot) diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml new file mode 100644 index 00000000..acc4e39f --- /dev/null +++ b/.github/workflows/dependabot-automerge.yml @@ -0,0 +1,40 @@ +name: Dependabot auto-approve and auto-merge + +on: + pull_request_target: + types: [opened, synchronize, reopened] + +permissions: + pull-requests: write + contents: write + +jobs: + dependabot: + runs-on: [self-hosted, ci-universal] + if: github.actor == 'dependabot[bot]' + + steps: + - name: Checkout Repo + uses: actions/checkout@v5 + with: + fetch-depth: 1 + + - name: Install GitHub CLI + run: | + sudo apt-get update + sudo apt-get install -y gh + + - name: Authenticate gh + run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token + + - name: Approve dependabot PRs + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Merge for dependabot PRs + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/packages/demo-nextjs/next-env.d.ts b/packages/demo-nextjs/next-env.d.ts index 3cd7048e..725dd6f2 100644 --- a/packages/demo-nextjs/next-env.d.ts +++ b/packages/demo-nextjs/next-env.d.ts @@ -3,4 +3,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. +// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.