From e8f3f6efa9c034b76d104b3c12a532fca408c185 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 5 Jul 2023 07:34:02 +0200 Subject: [PATCH 1/5] Delete auto-update.yml --- .github/workflows/auto-update.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/workflows/auto-update.yml diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml deleted file mode 100644 index 16388fd6dee..00000000000 --- a/.github/workflows/auto-update.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: Schedule Auto Update - -on: - schedule: - - cron: "30 4 * * *" - -jobs: - auto-update: - strategy: - matrix: - update: [{ head: "main", base: "dbux-3" }] - uses: ./.github/workflows/99-auto-update-pr.yml - with: - head: ${{ matrix.update.head }} - base: ${{ matrix.update.base }} From a6705699e386b78e93610f85371a9015e7585c48 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 5 Jul 2023 07:58:29 +0200 Subject: [PATCH 2/5] Delete 99-auto-update-pr.yml --- .github/workflows/99-auto-update-pr.yml | 44 ------------------------- 1 file changed, 44 deletions(-) delete mode 100644 .github/workflows/99-auto-update-pr.yml diff --git a/.github/workflows/99-auto-update-pr.yml b/.github/workflows/99-auto-update-pr.yml deleted file mode 100644 index cc205dbcaba..00000000000 --- a/.github/workflows/99-auto-update-pr.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -name: Auto Update PR - -on: - workflow_call: - inputs: - head: - required: true - type: string - base: - required: true - type: string - -permissions: - pull-requests: write - contents: write - -jobs: - create-pull-request: - runs-on: ubuntu-latest - steps: - - name: ⬇️ Checkout repo - uses: actions/checkout@v3 - - - name: ↔ Create Pull Request - uses: actions/github-script@v6 - id: create-pr - with: - result-encoding: string - script: | - const script = require('./.github/scripts/auto-update-pr.js') - const head = '${{ inputs.head }}'; - const base = '${{ inputs.base }}'; - return await script({github, context}, head, base) - - - name: 🤖 Enable auto-merge for auto-update - run: | - if [[ $PR_URL != false ]]; - then - gh pr merge --auto --merge "$PR_URL" - fi - env: - PR_URL: ${{steps.create-pr.outputs.result}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} From 4f9f44792cb1476b8c5b756c78bd74435a7f1c3a Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 5 Jul 2023 07:59:43 +0200 Subject: [PATCH 3/5] Update default.yml --- .github/workflows/default.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 6f44bd35051..2da024a1b84 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -5,7 +5,6 @@ on: push: branches: - "main" - - "dbux-3" jobs: init: From d627e257356dafc9dbf9f94f747d7e01a3f04378 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:00:04 +0200 Subject: [PATCH 4/5] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f6796305716..dda5ee22dff 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "prepare": "node -e \"try { require('husky').install() } catch (e) {}\"" }, "validate-branch-name": { - "pattern": "((dbux-3)|(dependabot-)|^((test|feat|fix|chore|docs|refactor|style|ci|perf|[0-9]+)\\-[a-zA-Z0-9\\-]+)$)", + "pattern": "((dependabot-)|^((test|feat|fix|chore|docs|refactor|style|ci|perf|[0-9]+)\\-[a-zA-Z0-9\\-]+)$)", "errorMsg": "There is something wrong with your branch name. You should rename your branch to a valid name and try again. See the Pattern below." }, "keywords": [], From 72e832f9cc68d4fefff3f4c0be10aebec3eff59e Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 19 Jul 2023 06:57:52 +0200 Subject: [PATCH 5/5] Discard changes to .github/workflows/99-auto-update-pr.yml --- .github/workflows/99-auto-update-pr.yml | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/99-auto-update-pr.yml diff --git a/.github/workflows/99-auto-update-pr.yml b/.github/workflows/99-auto-update-pr.yml new file mode 100644 index 00000000000..cc205dbcaba --- /dev/null +++ b/.github/workflows/99-auto-update-pr.yml @@ -0,0 +1,44 @@ +--- +name: Auto Update PR + +on: + workflow_call: + inputs: + head: + required: true + type: string + base: + required: true + type: string + +permissions: + pull-requests: write + contents: write + +jobs: + create-pull-request: + runs-on: ubuntu-latest + steps: + - name: ⬇️ Checkout repo + uses: actions/checkout@v3 + + - name: ↔ Create Pull Request + uses: actions/github-script@v6 + id: create-pr + with: + result-encoding: string + script: | + const script = require('./.github/scripts/auto-update-pr.js') + const head = '${{ inputs.head }}'; + const base = '${{ inputs.base }}'; + return await script({github, context}, head, base) + + - name: 🤖 Enable auto-merge for auto-update + run: | + if [[ $PR_URL != false ]]; + then + gh pr merge --auto --merge "$PR_URL" + fi + env: + PR_URL: ${{steps.create-pr.outputs.result}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}