Skip to content

Commit

Permalink
Update GitHub actions to trigger properly and add go/linter actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
bstoll committed Jan 15, 2025
1 parent 8e8045a commit 6fc3399
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 23 deletions.
31 changes: 8 additions & 23 deletions .github/workflows/ci-cpp-build-gnmi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: "bazel build"

on:
push:
branches: [ main ]
branches: [ master ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 0 * * *"

Expand All @@ -14,24 +13,10 @@ jobs:
env:
BAZEL: bazelisk-linux-amd64
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Mount bazel cache
uses: actions/cache@v2
with:
# See https://docs.bazel.build/versions/master/output_directories.html
path: "~/.cache/bazel"
# Create a new cache entry whenever Bazel files change.
# See https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
key: bazel-${{ runner.os }}-build-${{ hashFiles('**/*.bzl', '**/*.bazel') }}
restore-keys: |
bazel-${{ runner.os }}-build-
- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.8.1/$BAZEL"
chmod +x $BAZEL
sudo mv $BAZEL /usr/local/bin/bazel
- name: Build
run: bazel build //...

- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Bazel
uses: bazelbuild/setup-bazelisk@v3
- name: Build
run: bazel build //...
12 changes: 12 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Go

on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: "0 0 * * *"

jobs:
go:
uses: openconfig/common-ci/.github/workflows/[email protected]
22 changes: 22 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint Code Base

on:
push:
branches: [ master ]
pull_request:

jobs:
build:
name: Lint Code Base
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Lint protobuf
uses: plexsystems/[email protected]
with:
configDirectory: .github

0 comments on commit 6fc3399

Please sign in to comment.