Skip to content

Commit

Permalink
Add a new workflow to separate dco check
Browse files Browse the repository at this point in the history
The Dco check needs to run on every code change regardless of whether it is a
documentation or code change hence seperating it out into a different
workflow.

Signed-off-by: Arjun Raja Yogidas <arjunry@amazon.com>
  • Loading branch information
coderbirju committed Jul 11, 2023
1 parent 890e0f4 commit f84076c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ on:
- 'scripts/**'

jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
# check-dco will check the last 20 commits, but commit ranges
# exclude the start commit in the result, but need that commit
# in order to calculate the range. i.e. HEAD~20..HEAD includes
# 20 commits, but including HEAD it needs 21 commits.
fetch-depth: 21
- uses: actions/setup-go@v4
with:
go-version: '1.18.10'
- run: wget https://github.com/google/flatbuffers/releases/download/v22.9.29/Linux.flatc.binary.g++-10.zip
- run: unzip Linux.flatc.binary.g++-10.zip
- run: ./scripts/install-check-tools.sh
- run: ./scripts/check-ltag.sh
- run: ./scripts/check-dco.sh
- run: ./scripts/check-lint.sh
- run: PATH=$PATH:$(pwd) ./scripts/check-flatc.sh
test:
runs-on: ubuntu-20.04
steps:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/prebuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Pre-build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
# check-dco will check the last 20 commits, but commit ranges
# exclude the start commit in the result, but need that commit
# in order to calculate the range. i.e. HEAD~20..HEAD includes
# 20 commits, but including HEAD it needs 21 commits.
fetch-depth: 21
- uses: actions/setup-go@v4
with:
go-version: '1.18.10'
- run: wget https://github.com/google/flatbuffers/releases/download/v22.9.29/Linux.flatc.binary.g++-10.zip
- run: unzip Linux.flatc.binary.g++-10.zip
- run: ./scripts/install-check-tools.sh
- run: ./scripts/check-ltag.sh
- run: ./scripts/check-dco.sh
- run: ./scripts/check-lint.sh
- run: PATH=$PATH:$(pwd) ./scripts/check-flatc.sh

0 comments on commit f84076c

Please sign in to comment.