diff --git a/.github/actions/github-app-token/action.yml b/.github/actions/github-app-token/action.yml new file mode 100644 index 0000000..813a93d --- /dev/null +++ b/.github/actions/github-app-token/action.yml @@ -0,0 +1,25 @@ +name: github-app-token +description: github-app-token +inputs: + app_id: + description: app_id + required: true + private_key: + description: private_key + required: true + +outputs: + token: + description: token + value: ${{ steps.token.outputs.token }} + +runs: + using: composite + steps: + - uses: tibdex/github-app-token@v1.6.0 + with: + app_id: ${{ inputs.app_id }} + private_key: ${{ inputs.private_key }} + env: + OPENSSL_CONF: /dev/null + id: token diff --git a/.github/workflows/enable-automerge.yml b/.github/workflows/enable-automerge.yml new file mode 100644 index 0000000..ba13997 --- /dev/null +++ b/.github/workflows/enable-automerge.yml @@ -0,0 +1,26 @@ +name: Enable auto merge +on: + pull_request: + types: + - opened + - reopened + branches: + - main + - develop + +jobs: + enable-auto-merge: + runs-on: ubuntu-latest + # if: github.event.pull_request.user.login == 'renovate[bot]' && contains(github.event.pull_request.labels.*.name, 'dependencies') + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Generate github token + id: generate_token + uses: ./.github/actions/github-app-token + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + - uses: alexwilson/enable-github-automerge-action@main + with: + github-token: ${{ steps.generate_token.outputs.token }} diff --git a/renovate.json b/renovate.json index 34d8a6d..4721abd 100644 --- a/renovate.json +++ b/renovate.json @@ -12,6 +12,5 @@ "matchUpdateTypes": ["major"], "addLabels": ["major update"] } - ], - "assignees": ["na2na-p"] + ] }