From 268af28fe959faa40821f41ef80a9cb4ecc9df3c Mon Sep 17 00:00:00 2001 From: Maxim Schuwalow Date: Sun, 14 Jan 2024 16:57:37 +0100 Subject: [PATCH] adjust workflows --- .github/pr-labeler.yml | 3 +++ .github/renovate.json | 13 ------------- .github/workflows/auto-approve.yml | 6 ++++-- .github/workflows/auto-update.yaml | 20 +++++++++++++------- .github/workflows/pr-labeler.yml | 19 +++++++++++++++++++ .github/workflows/release-drafter.yml | 8 ++++++-- .mergify.yml | 24 ------------------------ 7 files changed, 45 insertions(+), 48 deletions(-) create mode 100644 .github/pr-labeler.yml delete mode 100644 .github/renovate.json create mode 100644 .github/workflows/pr-labeler.yml delete mode 100644 .mergify.yml diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml new file mode 100644 index 0000000..053f8db --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,3 @@ +automerge: 'update/*' +autoupdate: 'update/*' +dependency-update: 'update/*' diff --git a/.github/renovate.json b/.github/renovate.json deleted file mode 100644 index 86e50ef..0000000 --- a/.github/renovate.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "automerge": true, - "rebaseWhen": "conflicted", - "labels": ["type: dependencies"], - "packageRules": [ - { - "matchManagers": [ - "sbt" - ], - "enabled": false - } - ] -} diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index e2bbccb..320e4ed 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -6,8 +6,10 @@ on: jobs: auto-approve: runs-on: ubuntu-22.04 + permissions: + pull-requests: write steps: - - uses: hmarr/auto-approve-action@v3.2.1 + - uses: hmarr/auto-approve-action@v3 if: github.actor == 'scala-steward' || github.actor == 'renovate[bot]' with: - github-token: "${{ secrets.GITHUB_TOKEN }}" + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/auto-update.yaml b/.github/workflows/auto-update.yaml index 49adc0c..fa804da 100644 --- a/.github/workflows/auto-update.yaml +++ b/.github/workflows/auto-update.yaml @@ -1,14 +1,20 @@ -name: autoupdate +name: Autoupdate PRs + on: push: {} + pull_request: + types: + - labeled + jobs: autoupdate: - name: autoupdate - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + permissions: + contents: write steps: - uses: docker://chinthakagodawita/autoupdate-action:v1 env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - PR_FILTER: "labelled" - PR_LABELS: "type: dependencies,autoupdate" - EXCLUDED_LABELS: "do-not-autoupdate" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_FILTER: labelled + PR_LABELS: autoupdate + MERGE_CONFLICT_ACTION: ignore diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 0000000..e76e485 --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,19 @@ +name: Label PR + +on: + pull_request_target: + types: + - reopened + - opened + +jobs: + pr-labeler: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: TimonVS/pr-labeler-action@v4 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/pr-labeler.yml diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index be3535e..1cfb781 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -2,11 +2,15 @@ name: Release Drafter on: push: - branches: ['master'] + branches: + - master jobs: update_release_draft: - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 + permissions: + contents: write + pull-requests: write steps: - uses: release-drafter/release-drafter@v5 env: diff --git a/.mergify.yml b/.mergify.yml deleted file mode 100644 index de15e3d..0000000 --- a/.mergify.yml +++ /dev/null @@ -1,24 +0,0 @@ -pull_request_rules: - - name: assign and label scala-steward's PRs - conditions: - - author=scala-steward - actions: - label: - add: ["type: dependencies"] - - name: label scala-steward's breaking PRs - conditions: - - author=scala-steward - - "body~=(labels: library-update, semver-major)|(labels: sbt-plugin-update, semver-major)" - actions: - label: - add: ["type: breaking"] - - name: merge Scala Steward's PRs - conditions: - - base=master - - author=scala-steward - - "body~=(labels: library-update, semver-minor)|(labels: library-update, semver-patch)|(labels: sbt-plugin-update, semver-minor)|(labels: sbt-plugin-update, semver-patch)|(labels: scalafix-rule-update)|(labels: test-library-update)" - - "status-success=license/cla" - - "status-success=ci" - actions: - merge: - method: squash