From 7f0b32347ead071ae3590d14738c310704587d0a Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Fri, 24 May 2024 02:09:00 +0200 Subject: [PATCH 1/2] Set default value to commiter and reviewer --- .gitea/workflows/maintenance.yaml | 110 ++++++++++++++++-------------- 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/.gitea/workflows/maintenance.yaml b/.gitea/workflows/maintenance.yaml index 35e229f..d996c7b 100644 --- a/.gitea/workflows/maintenance.yaml +++ b/.gitea/workflows/maintenance.yaml @@ -1,53 +1,57 @@ -name: Auto Maintenance Cycle - -on: - push: - paths: - - .gitea/workflows/maintenance.yaml - schedule: - - cron: '@weekly' - workflow_dispatch: - -jobs: - auto-update: - name: pre-commit Autoupdate - runs-on: pi64 - env: - SPECIFIC_BRANCH: chore/update-pre-commit - steps: - - uses: actions/checkout@v4 - with: - ref: main - token: ${{ secrets.REPO_TOKEN }} - - name: Attempt to checkout specific branch - uses: actions/checkout@v4 - with: - ref: ${{ env.SPECIFIC_BRANCH }} - token: ${{ secrets.REPO_TOKEN }} - continue-on-error: true - - uses: actions/setup-python@v4 - - run: pip install pre-commit - shell: bash - - run: pre-commit autoupdate - shell: bash - - name: Test pre-commit - run: SKIP=no-commit-to-branch pre-commit run -a - - name: Commit - id: auto-commit-action - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: 'chore: update pre-commit hooks' - branch: ${{ env.SPECIFIC_BRANCH }} - create_branch: true - - name: Generate Date - run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Create an PR action - if: steps.auto-commit-action.outputs.changes_detected == 'true' - uses: https://git.horstenkamp.eu/Philipp/gitea-act-create-pr@main - with: - token: ${{ secrets.REPO_TOKEN }} - branch: ${{ env.SPECIFIC_BRANCH }} - title: Updates to the pre-commit action created at ${{ env.CURRENT_DATE }} - body: Update to the pre-commit action. - assignees: Philipp - reviewers: Philipp +name: Auto Maintenance Cycle + +on: + push: + paths: + - .gitea/workflows/maintenance.yaml + schedule: + - cron: '@weekly' + workflow_dispatch: + +jobs: + auto-update: + name: pre-commit Autoupdate + runs-on: pi64 + env: + SPECIFIC_BRANCH: chore/update-pre-commit + steps: + - uses: actions/checkout@v4 + with: + ref: main + token: ${{ secrets.REPO_TOKEN }} + - name: Attempt to checkout specific branch + uses: actions/checkout@v4 + with: + ref: ${{ env.SPECIFIC_BRANCH }} + token: ${{ secrets.REPO_TOKEN }} + continue-on-error: true + - uses: actions/setup-python@v4 + - run: pip install pre-commit + shell: bash + - run: pre-commit autoupdate + shell: bash + - name: Test pre-commit + run: SKIP=no-commit-to-branch pre-commit run -a + - name: Commit + id: auto-commit-action + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: 'chore: update pre-commit hooks' + branch: ${{ env.SPECIFIC_BRANCH }} + create_branch: true + commit_user_name: runner + commit_user_email: git@horstenkamp.eu + commit_author: runner + - name: Generate Date + run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + - name: Create an PR action + if: steps.auto-commit-action.outputs.changes_detected == 'true' + uses: https://git.horstenkamp.eu/Philipp/gitea-act-create-pr@main + with: + token: ${{ secrets.REPO_TOKEN }} + branch: ${{ env.SPECIFIC_BRANCH }} + title: Updates to the pre-commit action created at ${{ env.CURRENT_DATE }} + body: Update to the pre-commit action. + base_branch: ${{gitea.ref_name}} + assignees: Philipp + reviewers: Philipp -- 2.47.2 From 83091649789eb062d183b7a70baac2430d5689eb Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Fri, 24 May 2024 02:20:23 +0200 Subject: [PATCH 2/2] Added an assigne as a variable. --- .gitea/workflows/maintenance.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/maintenance.yaml b/.gitea/workflows/maintenance.yaml index d996c7b..5488798 100644 --- a/.gitea/workflows/maintenance.yaml +++ b/.gitea/workflows/maintenance.yaml @@ -53,5 +53,5 @@ jobs: title: Updates to the pre-commit action created at ${{ env.CURRENT_DATE }} body: Update to the pre-commit action. base_branch: ${{gitea.ref_name}} - assignees: Philipp - reviewers: Philipp + assignees: ${{ vars.ASSIGNEES }} + reviewers: ${{ vars.REVIEWERS }} -- 2.47.2