From 6044d45df2d9073055b3aa6d06301205f0311d88 Mon Sep 17 00:00:00 2001 From: Bear Date: Thu, 8 Aug 2024 06:27:14 -0500 Subject: [PATCH] Add GitHub Actions workflows and configuration files for file synchronization, label creation, and auto-merge - Add `.github/sync.yml` for syncing files across repositories - Add `.github/labels.yml` for defining GitHub issue labels - Add `.github/workflows/sync.yml` for automating file synchronization - Add `.github/workflows/create-labels.yml` for automating label creation - Add `.github/workflows/auto-merge.yml` for automating dependency updates - Add `.github/dependabot.yml` for configuring Dependabot updates - Add `.github/auto-merge.yml` for auto-merging dependency updates - Add `.github/FUNDING.yml` for funding links - Add `.github/CODEOWNERS` for repository ownership configuration --- .github/CODEOWNERS | 1 + .github/FUNDING.yml | 2 + .github/auto-merge.yml | 3 ++ .github/dependabot.yml | 11 +++++ .github/labels.yml | 73 +++++++++++++++++++++++++++++ .github/sync.yml | 71 ++++++++++++++++++++++++++++ .github/workflows/auto-merge.yml | 14 ++++++ .github/workflows/create-labels.yml | 21 +++++++++ .github/workflows/sync.yml | 17 +++++++ 9 files changed, 213 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/FUNDING.yml create mode 100644 .github/auto-merge.yml create mode 100644 .github/dependabot.yml create mode 100644 .github/labels.yml create mode 100644 .github/sync.yml create mode 100644 .github/workflows/auto-merge.yml create mode 100644 .github/workflows/create-labels.yml create mode 100644 .github/workflows/sync.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..f7a0035 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @N6REJ diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..5456cd4 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: N6REJ +custom: https://www.paypal.me/BearLeeAble diff --git a/.github/auto-merge.yml b/.github/auto-merge.yml new file mode 100644 index 0000000..36c25f1 --- /dev/null +++ b/.github/auto-merge.yml @@ -0,0 +1,3 @@ +- match: + dependency_type: all + update_type: "semver:minor" # includes patch updates! diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f16e1f1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + time: "08:00" + timezone: "America/Chicago" + labels: + - ":game_die: dependencies" + - ":robot: bot" diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000..58933f0 --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,73 @@ +## more info https://github.com/crazy-max/ghaction-github-labeler +- # bot + name: ":robot: bot" + color: "69cde9" + description: "" +- # bug + name: ":bug: bug" + color: "b60205" + description: "" +- # dependencies + name: ":game_die: dependencies" + color: "0366d6" + description: "" +- # documentation + name: ":memo: documentation" + color: "c5def5" + description: "" +- # duplicate + name: ":busts_in_silhouette: duplicate" + color: "cccccc" + description: "" +- # enhancement + name: ":sparkles: enhancement" + color: "0054ca" + description: "" +- # feature request + name: ":bulb: feature request" + color: "0e8a16" + description: "" +- # feedback + name: ":mega: feedback" + color: "03a9f4" + description: "" +- # future maybe + name: ":rocket: future maybe" + color: "fef2c0" + description: "" +- # good first issue + name: ":hatching_chick: good first issue" + color: "7057ff" + description: "" +- # hold + name: ":hand: hold" + color: "24292f" + description: "" +- # invalid + name: ":no_entry_sign: invalid" + color: "e6e6e6" + description: "" +- # maybe bug + name: ":interrobang: maybe bug" + color: "ff5722" + description: "" +- # needs more info + name: ":thinking: needs more info" + color: "795548" + description: "" +- # Has PR + name: "PR :scientist:" + color: "FFFFFF" + description: "Has PR" +- # upstream + name: ":eyes: upstream" + color: "fbca04" + description: "" +- # wontfix + name: ":coffin: wontfix" + color: "ffffff" + description: "" +- # Hacktoberfest + name: "Hacktoberfest-accepted :mending_heart:" + description: "Accepted for Hacktoberfest" + from_name: "Hacktoberfest accepted" diff --git a/.github/sync.yml b/.github/sync.yml new file mode 100644 index 0000000..755b7d4 --- /dev/null +++ b/.github/sync.yml @@ -0,0 +1,71 @@ +group: +# Global files to be synced + - files: + - source: .github/CODEOWNERS + dest: .github/CODEOWNERS + - source: .github/FUNDING.yml + dest: .github/FUNDING.yml + - source: .github/dependabot.yml + dest: .github/dependabot.yml + - source: .github/labels.yml + dest: .github/labels.yml + - source: .github/workflows/create-labels.yml + dest: .github/workflows/create-labels.yml + - source: .github/workflows/release.yml + dest: .github/workflows/release.yml + - source: .github/auto-merge.yml + dest: .github/auto-merge.yml + - source: .github/workflows/auto-merge.yml + dest: .github/workflows/auto-merge.yml + - source: .gitignore + dest: .gitignore + - LICENSE + - favicon.ico + - source: .packager/ + dest: .packager/ + repos: | + N6REJ/Bears_audio_switcher + +# only for N6REJ/BetterBags + - files: + - source: wow/BetterBags/core.lua + dest: core.lua + - source: wow/BetterBags/expansion.lua + dest: expansion.lua + repos: | + N6REJ/BetterBags_Bears_Alchemy + N6REJ/BetterBags_Bears_Battle_Pet_Items + N6REJ/BetterBags_Bears_Blacksmithing + N6REJ/BetterBags_Bears_Cooking + N6REJ/BetterBags_Bears_Enchanting + N6REJ/BetterBags_Bears_Engineering + N6REJ/BetterBags_Bears_Fishing + N6REJ/BetterBags-Bears-Fishing-Items + N6REJ/BetterBags_Bears_Hearthstones + N6REJ/BetterBags_Bears_Herbs + N6REJ/BetterBags_Bears_Inscription + N6REJ/BetterBags_Bears_Jewelcrafting + N6REJ/BetterBags_Bears_Keystones + N6REJ/BetterBags_Bears_Leatherworking + N6REJ/BetterBags_Bears_Mining + N6REJ/BetterBags_Bears_Tailoring + N6REJ/BetterBags_Bears_Ultimate + + # only for Professions databases + - files: + - source: wow/DF-Global.lua + dest: DF-Global.lua + repos: | + N6REJ/BetterBags_Bears_Alchemy + N6REJ/BetterBags_Bears_Blacksmithing + N6REJ/BetterBags_Bears_Cooking + N6REJ/BetterBags_Bears_Enchanting + N6REJ/BetterBags_Bears_Engineering + N6REJ/BetterBags_Bears_Fishing + N6REJ/BetterBags_Bears_Herbs + N6REJ/BetterBags_Bears_Inscription + N6REJ/BetterBags_Bears_Jewelcrafting + N6REJ/BetterBags_Bears_Leatherworking + N6REJ/BetterBags_Bears_Mining + N6REJ/BetterBags_Bears_Tailoring + N6REJ/BetterBags_Bears_Ultimate diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 0000000..cf75c35 --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,14 @@ +name: auto-merge + +on: + pull_request: + +jobs: + auto-merge: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3.5.3 + - uses: ahmadnassri/action-dependabot-auto-merge@v2.6 + with: + target: minor + github-token: ${{ secrets.mytoken }} diff --git a/.github/workflows/create-labels.yml b/.github/workflows/create-labels.yml new file mode 100644 index 0000000..1118c17 --- /dev/null +++ b/.github/workflows/create-labels.yml @@ -0,0 +1,21 @@ +name: Create labels + +on: + push: + branches: + - 'main' + paths: + - '.github/labels.yml' + - '.github/workflows/create-labels.yml' + +jobs: + labeler: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3.5.3 + - + name: Run Labeler + if: success() + uses: crazy-max/ghaction-github-labeler@v4.1.0 diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000..54a9fef --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,17 @@ +name: Sync Files +on: + push: + branches: + - main + workflow_dispatch: +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Run GitHub File Sync + uses: BetaHuhn/repo-file-sync-action@latest + with: + GH_PAT: ${{ secrets.GH_PAT }} + SKIP_PR: true