Skip to content

Commit f5c48dd

Browse files
Agarwal-Shivanshgab-arroboSeanCondon
authored
GHA-integration initial commit (#211)
* GHA-integration initial commit * Update action * Update master.yml * lock in component versions --------- Co-authored-by: gab-arrobo <gabriel.arrobo@intel.com> Co-authored-by: SeanCondon <sean.condon@intel.com>
1 parent 58254ee commit f5c48dd

File tree

3 files changed

+86
-8
lines changed

3 files changed

+86
-8
lines changed

.github/dependabot.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright 2024 Intel Corporation
3+
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
12+
- package-ecosystem: "docker"
13+
directory: "build/protoc-go"
14+
schedule:
15+
interval: "weekly"
16+
17+
- package-ecosystem: "gomod"
18+
directory: "/"
19+
schedule:
20+
interval: "weekly"

.github/workflows/master.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright 2024 Intel Corporation
3+
4+
name: Master workflow
5+
on:
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
11+
jobs:
12+
golang-build-docker:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version-file: 'go.mod'
19+
- name: Build Golang-build docker image
20+
run: docker build -t onosproject/golang-build:latest build/golang-build
21+
22+
lint:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-go@v5
27+
with:
28+
go-version-file: 'go.mod'
29+
- uses: golangci/golangci-lint-action@v3.7.0
30+
with:
31+
version: latest
32+
args: -v --config ./.golangci.yml
33+
34+
protoc-go-docker:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: actions/setup-go@v5
39+
with:
40+
go-version-file: 'go.mod'
41+
- name: Build Protoc-go docker image
42+
run: docker build -t onosproject/protoc-go:latest build/protoc-go
43+
44+
license-check:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: reuse lint
49+
uses: fsfe/reuse-action@v2
50+
51+
fossa-check:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
- name: FOSSA scan
56+
uses: fossa-contrib/fossa-action@v3
57+
with:
58+
fossa-api-key: 6d304c09a3ec097ba4517724e4a4d17d

build/protoc-go/Dockerfile

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.19
1414
rm -rf protoc-3.19.4-linux-x86_64.zip
1515

1616
RUN export GO111MODULE=on && \
17-
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.0
17+
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.0 && \
18+
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0 && \
19+
go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.5.1 && \
20+
go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v1.16.0 && \
21+
go install github.com/envoyproxy/protoc-gen-validate@v0.6.4 && \
22+
go install github.com/favadi/protoc-go-inject-tag@v1.4.0
1823

1924
RUN export GO111MODULE=off && \
20-
go get -u google.golang.org/grpc/cmd/protoc-gen-go-grpc && \
2125
go get -u github.com/gogo/protobuf/proto && \
2226
go get -u github.com/gogo/protobuf/gogoproto && \
2327
go get -u github.com/gogo/protobuf/protoc-gen-gofast && \
2428
go get -u github.com/gogo/protobuf/protoc-gen-gogo && \
2529
go get -u github.com/gogo/protobuf/protoc-gen-gogofast && \
2630
go get -u github.com/gogo/protobuf/protoc-gen-gogofaster && \
27-
go get -u github.com/gogo/protobuf/protoc-gen-gogoslick && \
28-
go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc && \
29-
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway && \
30-
go get -u github.com/envoyproxy/protoc-gen-validate && \
31-
go get -u github.com/favadi/protoc-go-inject-tag
31+
go get -u github.com/gogo/protobuf/protoc-gen-gogoslick
3232

3333
RUN mkdir -p /go/src/github.com/google /go/src/github.com/p4lang && \
34-
git clone --branch main https://github.com/google/protobuf /go/src/github.com/google/protobuf && \
34+
git clone --branch 3.19.x https://github.com/protocolbuffers/protobuf /go/src/github.com/google/protobuf && \
3535
git clone --branch master https://github.com/openconfig/gnmi /go/src/github.com/openconfig/gnmi && \
3636
git clone --branch main https://github.com/p4lang/p4runtime /go/src/github.com/p4lang/p4runtime && \
3737
git clone --branch main https://github.com/googleapis/api-common-protos /go/src/github.com/googleapis/api-common-protos && \

0 commit comments

Comments
 (0)