Skip to content

Commit

Permalink
GHA-integration initial commit (#211)
Browse files Browse the repository at this point in the history
* GHA-integration initial commit

* Update action

* Update master.yml

* lock in component versions

---------

Co-authored-by: gab-arrobo <[email protected]>
Co-authored-by: SeanCondon <[email protected]>
  • Loading branch information
3 people authored Feb 28, 2024
1 parent 58254ee commit f5c48dd
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 8 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Intel Corporation

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "docker"
directory: "build/protoc-go"
schedule:
interval: "weekly"

- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
58 changes: 58 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Intel Corporation

name: Master workflow
on:
push:
branches:
- master
pull_request:

jobs:
golang-build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Build Golang-build docker image
run: docker build -t onosproject/golang-build:latest build/golang-build

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: golangci/[email protected]
with:
version: latest
args: -v --config ./.golangci.yml

protoc-go-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Build Protoc-go docker image
run: docker build -t onosproject/protoc-go:latest build/protoc-go

license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: reuse lint
uses: fsfe/reuse-action@v2

fossa-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: FOSSA scan
uses: fossa-contrib/fossa-action@v3
with:
fossa-api-key: 6d304c09a3ec097ba4517724e4a4d17d
16 changes: 8 additions & 8 deletions build/protoc-go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.19
rm -rf protoc-3.19.4-linux-x86_64.zip

RUN export GO111MODULE=on && \
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/protobuf/cmd/[email protected] && \
go install google.golang.org/grpc/cmd/[email protected] && \
go install github.com/pseudomuto/protoc-gen-doc/cmd/[email protected] && \
go install github.com/grpc-ecosystem/grpc-gateway/[email protected] && \
go install github.com/envoyproxy/[email protected] && \
go install github.com/favadi/[email protected]

RUN export GO111MODULE=off && \
go get -u google.golang.org/grpc/cmd/protoc-gen-go-grpc && \
go get -u github.com/gogo/protobuf/proto && \
go get -u github.com/gogo/protobuf/gogoproto && \
go get -u github.com/gogo/protobuf/protoc-gen-gofast && \
go get -u github.com/gogo/protobuf/protoc-gen-gogo && \
go get -u github.com/gogo/protobuf/protoc-gen-gogofast && \
go get -u github.com/gogo/protobuf/protoc-gen-gogofaster && \
go get -u github.com/gogo/protobuf/protoc-gen-gogoslick && \
go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc && \
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway && \
go get -u github.com/envoyproxy/protoc-gen-validate && \
go get -u github.com/favadi/protoc-go-inject-tag
go get -u github.com/gogo/protobuf/protoc-gen-gogoslick

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

0 comments on commit f5c48dd

Please sign in to comment.