Skip to content

Commit 00fa6cf

Browse files
Merge pull request #97 from ApolloAutomation/chore/consolidate-workflows
Consolidate workflows into shared ApolloAutomation/Workflows reusable workflows
2 parents c9f06fd + b6cd611 commit 00fa6cf

4 files changed

Lines changed: 46 additions & 70 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
# To get started with Dependabot version updates, you'll need to specify which
2-
# package ecosystems to update and where the package manifests are located.
3-
# Please see the documentation for all configuration options:
4-
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5-
6-
version: 2
7-
updates:
8-
- package-ecosystem: "github-actions"
9-
directory: "/"
10-
schedule:
11-
interval: "daily"
12-
commit-message:
13-
prefix: "chore(ci): "
14-
groups:
15-
github-actions:
16-
patterns:
17-
- "*"
1+
# Action version pins live in ApolloAutomation/Workflows (reusable workflows
2+
# referenced @main), so this config normally has nothing to update. It stays
3+
# as a safety net in case a version-pinned action is added here later.
4+
version: 2
5+
updates:
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "monthly"
10+
commit-message:
11+
prefix: "chore(ci): "
12+
groups:
13+
github-actions:
14+
patterns:
15+
- "*"

‎.github/workflows/autoassign.yml‎

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
name: Auto Assign
2+
23
on:
34
issues:
45
types: [opened]
56
pull_request:
67
types: [opened]
8+
9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
713
jobs:
8-
run:
9-
runs-on: ubuntu-latest
14+
auto-assign:
1015
# Skip auto-assign for pull requests from forks due to GITHUB_TOKEN permission restrictions
1116
if: github.event_name == 'issues' || github.event.pull_request.head.repo.full_name == github.repository
12-
permissions:
13-
issues: write
14-
pull-requests: write
15-
steps:
16-
- name: 'Auto-assign issue'
17-
uses: pozil/auto-assign-issue@v3
18-
with:
19-
repo-token: ${{ secrets.GITHUB_TOKEN }}
20-
assignees: bharvey88
21-
numOfAssignee: 1
17+
uses: ApolloAutomation/Workflows/.github/workflows/autoassign.yml@main
18+
with:
19+
assignees: bharvey88
20+
num-of-assignees: 1

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,21 @@ on:
44
pull_request:
55

66
permissions:
7-
# Allow GITHUB_TOKEN to add labels to pull requests
87
pull-requests: write
98
issues: write
109
contents: read
11-
id-token: write
1210

1311
jobs:
1412
label-check:
1513
name: Label Check
1614
uses: ApolloAutomation/Workflows/.github/workflows/label-check.yml@main
17-
15+
1816
ci:
19-
name: Building ${{ matrix.file }} / ESPHome ${{ matrix.esphome-version }}
20-
runs-on: ubuntu-latest
21-
strategy:
22-
matrix:
23-
file:
24-
- Integrations/ESPHome/MTR-1_Factory.yaml
25-
- Integrations/ESPHome/MTR-1.yaml
26-
- Integrations/ESPHome/MTR-1_BLE.yaml
27-
esphome-version:
28-
- stable
29-
- beta
30-
- dev
31-
steps:
32-
- name: Checkout source code
33-
uses: actions/checkout@v6.0.2
34-
- name: Build ESPHome firmware to verify configuration
35-
uses: esphome/build-action@v7
36-
with:
37-
yaml-file: ${{ matrix.file }}
17+
name: CI
18+
uses: ApolloAutomation/Workflows/.github/workflows/esphome-ci.yml@main
19+
with:
20+
yaml-files: |
21+
Integrations/ESPHome/MTR-1_Factory.yaml
22+
Integrations/ESPHome/MTR-1.yaml
23+
Integrations/ESPHome/MTR-1_BLE.yaml
24+

‎.github/workflows/weekly.yml‎

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,16 @@ on:
44
schedule:
55
- cron: '0 0 * * 1'
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
build:
9-
name: Building ${{ matrix.file }} / ESPHome ${{ matrix.esphome-version }}
10-
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
file:
14-
- Integrations/ESPHome/MTR-1_Factory.yaml
15-
- Integrations/ESPHome/MTR-1.yaml
16-
- Integrations/ESPHome/MTR-1_BLE.yaml
17-
esphome-version:
18-
- stable
19-
- beta
20-
- dev
21-
steps:
22-
- name: Checkout source code
23-
uses: actions/checkout@v6.0.2
24-
- name: Build ESPHome firmware to verify configuration
25-
uses: esphome/build-action@v7
26-
with:
27-
yaml-file: ${{ matrix.file }}
12+
name: Weekly Build
13+
uses: ApolloAutomation/Workflows/.github/workflows/esphome-ci.yml@main
14+
with:
15+
yaml-files: |
16+
Integrations/ESPHome/MTR-1_Factory.yaml
17+
Integrations/ESPHome/MTR-1.yaml
18+
Integrations/ESPHome/MTR-1_BLE.yaml
19+

0 commit comments

Comments
 (0)