Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/validate-generated-code.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Validate Generated Code"

on:
pull_request:
branches: [ master ]

jobs:
my_first_job:
steps:
- name: My first step
uses: docker://gcr.io/cloud-builders/gradle
Comment thread
nghialv marked this conversation as resolved.
Outdated

jobs:
analyze:
name: Analyze
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Generate code
uses: docker://gcr.io/pipecd/codegen:0.2.0
with:
args: /github/workspace
- name: Show Git status

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent error?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Fixed!

shell: bash
run: git status
- name: Validate
shell: bash
run: test -z "$(git status --porcelain)"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ update-docsy:

.PHONY: codegen
codegen:
docker run --rm -v ${PWD}:/repo -it gcr.io/pipecd/codegen:0.1.0
docker run --rm -v ${PWD}:/repo -it gcr.io/pipecd/codegen:0.2.0 /repo
2 changes: 1 addition & 1 deletion dockers/codegen/DOCKER_BUILD
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version: 0.1.0
version: 0.2.0
registry: gcr.io/pipecd/codegen
8 changes: 8 additions & 0 deletions dockers/codegen/codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ set -o errexit
set -o nounset
set -o pipefail

while [[ -z "$1" ]]
do
echo "Missing path to the root of repository"
exit 1
done

cd $1

# Generate Go files from proto files.
goProtoDirs=(
"pkg/model"
Expand Down