From 34f9b96d254a988322c9918e8355862caf8b3c3d Mon Sep 17 00:00:00 2001 From: N6REJ Date: Sun, 15 Sep 2024 18:25:50 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'.github/workfl?= =?UTF-8?q?ows'=20with=20remote=20'.dispatcher'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-merge.yml | 56 ---------------------- .github/workflows/create-labels.yml | 26 ---------- .github/workflows/quickpick-dispatcher.yml | 25 ++++++++++ 3 files changed, 25 insertions(+), 82 deletions(-) delete mode 100644 .github/workflows/auto-merge.yml delete mode 100644 .github/workflows/create-labels.yml create mode 100644 .github/workflows/quickpick-dispatcher.yml diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml deleted file mode 100644 index 04d8189..0000000 --- a/.github/workflows/auto-merge.yml +++ /dev/null @@ -1,56 +0,0 @@ -on: pull_request_target - -name: pull_request_target - -permissions: - pull-requests: write - contents: write - -jobs: - metadata: - runs-on: ubuntu-latest - - outputs: - repository: ${{ steps.metadata.outputs.repository }} - - steps: - - uses: actions/checkout@v4 - - - uses: ahmadnassri/action-metadata@v2 - id: metadata - - auto-merge: - timeout-minutes: 5 - - runs-on: ubuntu-latest - - # only run for dependabot PRs - if: ${{ github.actor == 'dependabot[bot]' }} - - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - steps: - - id: dependabot - uses: dependabot/fetch-metadata@v2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: auto merge conditions - id: auto-merge - if: | - ( - steps.dependabot.outputs.update-type == 'version-update:semver-patch' && - contains('direct:production,indirect:production', steps.dependabot.outputs.dependency-type) - ) || ( - steps.dependabot.outputs.update-type == 'version-update:semver-minor' && - contains('direct:development,indirect:development', steps.dependabot.outputs.dependency-type) - ) - run: echo "::notice ::auto-merge conditions satisfied" - - - name: auto approve pr - if: ${{ steps.auto-merge.conclusion == 'success' }} - run: | - gh pr review --approve "$PR_URL" - gh pr merge --auto --rebase "$PR_URL" diff --git a/.github/workflows/create-labels.yml b/.github/workflows/create-labels.yml deleted file mode 100644 index dc97151..0000000 --- a/.github/workflows/create-labels.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Create labels - -on: - push: - branches: - - 'main' - -jobs: - labeler: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Run Labeler - if: success() - uses: crazy-max/ghaction-github-labeler@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - yaml-file: .github/labels.yml - skip-delete: false - dry-run: false - exclude: | - help* - *issue diff --git a/.github/workflows/quickpick-dispatcher.yml b/.github/workflows/quickpick-dispatcher.yml new file mode 100644 index 0000000..8623cf7 --- /dev/null +++ b/.github/workflows/quickpick-dispatcher.yml @@ -0,0 +1,25 @@ +name: Quickpick Dispatcher + +on: + pull_request: + types: + - closed + branches: + - 'main' + workflow_dispatch: + +jobs: + if_merged: + if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Invoke workflow in another repo with inputs + uses: benc-uk/workflow-dispatch@v1.2.4 + with: + workflow: combine_releases.yml + repo: Bearsampp/Bearsampp + # Required when using the `repo` option. Either a PAT or a token generated from the GitHub app or CLI + token: "${{ secrets.GH_PAT }}"