Skip to content

Commit 7a4d876

Browse files
authored
Merge pull request #81 from AZ-First/actions_update
GitHub Action updates ahead of the 2026 season
2 parents 16dd297 + 19790f0 commit 7a4d876

6 files changed

Lines changed: 65 additions & 75 deletions

File tree

.github/workflows/admin-orchestrator.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ name: Admin branch orchestration
22

33
on:
44
create:
5+
56
push:
67
branches:
7-
- "**"
8+
- "main"
9+
810
schedule:
911
- cron: "0 3 * * 1" # Weekly, Monday 03:00 UTC
12+
1013
workflow_dispatch:
1114

1215
pull_request:
@@ -59,8 +62,12 @@ jobs:
5962
# Periodically rebase admin onto default (true rebase)
6063
# ------------------------------------------------------------
6164
- name: Rebase admin onto default
62-
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
65+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'push'
6366
run: |
67+
set -e
68+
git config user.name "github-actions[bot]"
69+
git config user.email "github-actions[bot]@users.noreply.github.com"
70+
6471
git fetch origin
6572
git checkout admin
6673

.github/workflows/build.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
# ------------------------------------------------------------
9+
# Main build job
10+
# ------------------------------------------------------------
11+
build:
12+
runs-on: ubuntu-latest
13+
container: wpilib/roborio-cross-ubuntu:2024-22.04
14+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request == null }}
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v6
19+
20+
- name: Mark repo as safe for git
21+
run: git config --global --add safe.directory $GITHUB_WORKSPACE
22+
23+
- name: Grant execute permission for gradlew
24+
run: chmod +x gradlew
25+
26+
- name: Set up Gradle cache
27+
uses: gradle/actions/setup-gradle@v4
28+
29+
- name: Build robot code
30+
run: ./gradlew build --no-daemon --parallel --build-cache
31+
32+
# ------------------------------------------------------------
33+
# Spotless job (separate for branch protection)
34+
# ------------------------------------------------------------
35+
spotless:
36+
runs-on: ubuntu-latest
37+
container: wpilib/roborio-cross-ubuntu:2024-22.04
38+
# Only run for PRs or pushes targeting main/develop
39+
if: github.base_ref == 'main' || github.base_ref == 'develop' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v6
43+
44+
- name: Grant execute permission for gradlew
45+
run: chmod +x gradlew
46+
47+
- name: Set up Gradle cache
48+
uses: gradle/actions/setup-gradle@v4
49+
50+
- name: Run Spotless check
51+
run: ./gradlew spotlessCheck --no-daemon --parallel --build-cache

.github/workflows/dependency-submission.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Dependency Submission
22

3+
# Purpose: Generate and submit Gradle dependency metadata (graph) to Gradle’s services.
4+
# Trigger: Push to main branch only.
5+
# Effect: Helps with dependency insight, conflict detection, and build analytics.
6+
37
on:
48
push:
59
branches: [ 'main' ]

.github/workflows/main.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pluginManagement {
44
repositories {
55
mavenLocal()
66
gradlePluginPortal()
7-
String frcYear = '2025'
7+
String frcYear = '2026beta'
88
File frcHome
99
if (OperatingSystem.current().isWindows()) {
1010
String publicFolder = System.getenv('PUBLIC')

0 commit comments

Comments
 (0)