Skip to content

Commit

Permalink
Add Labeler & Discord Webhooks
Browse files Browse the repository at this point in the history
- Add Labeler for PRs
- Separate prereleases and releases for Discord Webhooks
  • Loading branch information
donavanbecker committed Dec 28, 2023
1 parent 4fa8f5d commit 96d96e5
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Add 'beta' label to any PR where the base branch name starts with `beta` or has a `beta` section in the name
beta:
- base-branch: ['^beta', 'beta', 'beta*']

# Add 'beta' label to any PR where the base branch name starts with `beta` or has a `beta` section in the name
alpha:
- base-branch: ['^alpha', 'alpha', 'alpha*']

# Add 'latest' label to any PR where the base branch name starts with `latest` or has a `latest` section in the name
latest:
- base-branch: ['^latest', 'latest', 'latest*']
39 changes: 39 additions & 0 deletions .github/workflows/discord-webhooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This is a basic workflow to help you get started with Actions

name: Discord Webhooks

# Controls when the workflow will run
on:
release:
types: [released, prereleased]

jobs:
github-releases-to-discord:
runs-on: ubuntu-latest
name: GitHub Releases to Discord
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Latest Release
if: ${{ github.event.release.prerelease == false }}
uses: SethCohen/github-releases-to-discord@v1.13.1
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}
color: "4726621"
username: "Homebridge"
avatar_url: "https://raw.githubusercontent.com/homebridge/branding/latest/logos/homebridge-color-round-stylized.png"
footer_title: "FFmpeg for Homebridge"
footer_icon_url: "https://raw.githubusercontent.com/homebridge/branding/latest/logos/homebridge-color-round-stylized.png"
footer_timestamp: true

- name: Pre-Release
if: ${{ github.event.release.prerelease == true }}
uses: SethCohen/github-releases-to-discord@v1.13.1
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL_BETA }}
color: "4726621"
username: "Homebridge"
avatar_url: "https://raw.githubusercontent.com/homebridge/branding/latest/logos/homebridge-color-round-stylized.png"
footer_title: "Pre-Release: FFmpeg for Homebridge"
footer_icon_url: "https://raw.githubusercontent.com/homebridge/branding/latest/logos/homebridge-color-round-stylized.png"
footer_timestamp: true
12 changes: 12 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Labeler

on:
pull_request_target: # required for auto labeler
types: [opened, reopened, synchronize]
workflow_dispatch:

jobs:
stale:
uses: homebridge/.github/.github/workflows/labeler.yml@latest
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 96d96e5

Please sign in to comment.