From afed5bf109cd2ccaa289a14500f7b7b1091fe69f Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Wed, 24 Feb 2021 10:59:16 +0530 Subject: [PATCH] ci: fix codegen err codegen is currently broken in master. this commit fix the broken codegen by fixing the correct working directory in gh action. Signed-off-by: subhamkrai --- .github/workflows/codegen.yml | 12 ++++++++---- tests/scripts/validate_modified_files.sh | 1 - 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codegen.yml b/.github/workflows/codegen.yml index d4173676b..0c67ea10e 100644 --- a/.github/workflows/codegen.yml +++ b/.github/workflows/codegen.yml @@ -8,16 +8,20 @@ jobs: codegen: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v1 - - uses: actions/setup-go@v2 with: go-version: 1.15 + - name: checkout + uses: actions/checkout@v1 + + - name: copy working directory to GOPATH + run: sudo mkdir -p /home/runner/go/src/github.com && sudo cp -a /home/runner/work/rook /home/runner/go/src/github.com/ + - name: run codegen + working-directory: /home/runner/go/src/github.com/rook/rook run: GOPATH=$(go env GOPATH) make codegen - name: validate codegen + working-directory: /home/runner/go/src/github.com/rook/rook run: tests/scripts/validate_modified_files.sh codegen - diff --git a/tests/scripts/validate_modified_files.sh b/tests/scripts/validate_modified_files.sh index b2bf62b0e..8e2b2f692 100755 --- a/tests/scripts/validate_modified_files.sh +++ b/tests/scripts/validate_modified_files.sh @@ -37,4 +37,3 @@ case "$1" in exit 1 esac -