From 2ab0694215d6463e3e556dd76ae4f2dbc50e597f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Magalh=C3=A3es?= Date: Tue, 22 Oct 2024 14:17:46 +0100 Subject: [PATCH] chore: clean up pre-commit-update workflow (#141) --- .../workflows/pre-commit-auto-update-base.yml | 36 ------------------- .github/workflows/pre-commit-auto-update.yml | 24 ++++++++++--- 2 files changed, 19 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/pre-commit-auto-update-base.yml diff --git a/.github/workflows/pre-commit-auto-update-base.yml b/.github/workflows/pre-commit-auto-update-base.yml deleted file mode 100644 index 76339c83..00000000 --- a/.github/workflows/pre-commit-auto-update-base.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Pre-commit auto-update - -on: - workflow_call: - inputs: - PR_TITLE: - description: "Title for the PR this workflow will open" - required: true - type: string - PR_TEAM_REVIEWERS: - description: "A comma-separated list of team usernames to be added as reviewers" - required: false - type: string - -jobs: - pre-commit-auto-update: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install pre-commit - run: pip install pre-commit - - - name: Run pre-commit autoupdate - run: pre-commit autoupdate - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 - with: - token: ${{ secrets.PROJECT_AND_REPO_PAT }} - branch: pre-commit-auto-update - title: ${{ inputs.PR_TITLE }} - commit-message: "auto-update pre-commit hooks" - body: | - Update pre-commit hooks to latest version - team-reviewers: ${{ inputs.PR_TEAM_REVIEWERS }} diff --git a/.github/workflows/pre-commit-auto-update.yml b/.github/workflows/pre-commit-auto-update.yml index 0c633999..d99afa65 100644 --- a/.github/workflows/pre-commit-auto-update.yml +++ b/.github/workflows/pre-commit-auto-update.yml @@ -6,8 +6,22 @@ on: jobs: pre-commit-auto-update: - uses: ./.github/workflows/pre-commit-auto-update-base.yml - with: - PR_TITLE: "chore: auto-update pre-commit hooks" - PR_TEAM_REVIEWERS: sdk-team - secrets: inherit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit autoupdate + run: pre-commit autoupdate + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + token: ${{ secrets.PROJECT_AND_REPO_PAT }} + branch: chore/pre-commit-auto-update + title: "chore: auto-update pre-commit hooks" + commit-message: "auto-update pre-commit hooks" + body: | + Update pre-commit hooks to latest version