Skip to content

Commit

Permalink
Switch to centralized GitHub Action Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Nov 2, 2021
1 parent a5a5ae8 commit 6c0c947
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 176 deletions.
85 changes: 0 additions & 85 deletions .github/labels.yml

This file was deleted.

22 changes: 7 additions & 15 deletions .github/workflows/labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,12 @@ name: Sync labels

# yamllint disable-line rule:truthy
on:
push:
branches:
- master
paths:
- .github/labels.yml
schedule:
- cron: "34 5 * * *"
workflow_dispatch:

jobs:
labels:
name: ♻️ Sync labels
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v2.3.5
- name: 🚀 Run Label Syncer
uses: micnncim/action-label-syncer@v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
workflows:
uses: hassio-addons/workflows/.github/workflows/labels.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 2 additions & 19 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,5 @@ on:
workflow_dispatch:

jobs:
json:
name: JSON Lint
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v2.3.5
- name: 🚀 Run JQ
run: |
shopt -s globstar
cat **/*.json | jq '.'
yamllint:
name: YAMLLint
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v2.3.5
- name: 🚀 Run YAMLLint
uses: frenck/action-yamllint@v1.1
workflows:
uses: hassio-addons/workflows/.github/workflows/repository-lint.yaml@main
15 changes: 4 additions & 11 deletions .github/workflows/lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@ on:
workflow_dispatch:

jobs:
lock:
name: 🔒 Lock closed issues and PRs
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3.0.0
with:
github-token: ${{ github.token }}
issue-inactive-days: "30"
issue-lock-reason: ""
pr-inactive-days: "1"
pr-lock-reason: ""
workflows:
uses: hassio-addons/workflows/.github/workflows/lock.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/pr-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: PR Labels

# yamllint disable-line rule:truthy
on:
pull_request_target:
types:
- opened
- labeled
- unlabeled
- synchronize

jobs:
workflows:
uses: hassio-addons/workflows/.github/workflows/pr-labels.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 5 additions & 16 deletions .github/workflows/repository-updater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,8 @@ on:
types: ["update"]

jobs:
publish:
name: Publish add-on update
runs-on: ubuntu-latest
steps:
- name: 🔂 Wait for other runs to complete
uses: softprops/turnstyle@v1
with:
continue-after-seconds: 1200
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 🚀 Run Repository Updater
uses: hassio-addons/repository-updater@v1.2
with:
addon: ${{ github.event.client_payload.addon }}
repository: ${{ github.repository }}
token: ${{ secrets.UPDATER_TOKEN }}
workflows:
uses: hassio-addons/workflows/.github/workflows/repository-updater.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPDATER_TOKEN: ${{ secrets.UPDATER_TOKEN }}
34 changes: 4 additions & 30 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,7 @@ on:
workflow_dispatch:

jobs:
stale:
name: 🧹 Clean up stale issues and PRs
runs-on: ubuntu-latest
steps:
- name: 🚀 Run stale
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 7
remove-stale-when-updated: true
stale-issue-label: "stale"
exempt-issue-labels: "no-stale,help-wanted"
stale-issue-message: >
There hasn't been any activity on this issue recently, so we
clean up some of the older and inactive issues.
Please make sure to update to the latest version and
check if that solves the issue. Let us know if that works for you
by leaving a comment 👍
This issue has now been marked as stale and will be closed if no
further activity occurs. Thanks!
stale-pr-label: "stale"
exempt-pr-labels: "no-stale"
stale-pr-message: >
There hasn't been any activity on this pull request recently. This
pull request has been automatically marked as stale because of that
and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.
workflows:
uses: hassio-addons/workflows/.github/workflows/stale.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6c0c947

Please sign in to comment.