From c366872ba61c76bc171b29dc81ee69ac904c403d Mon Sep 17 00:00:00 2001 From: hlts2 Date: Mon, 29 Jan 2024 15:58:30 +0900 Subject: [PATCH 1/2] feat: use ci image tag when ci container image is created Signed-off-by: hlts2 --- .github/workflows/e2e-code-bench-agent.yaml | 9 +++++++-- .github/workflows/helm-lint.yml | 12 ++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-code-bench-agent.yaml b/.github/workflows/e2e-code-bench-agent.yaml index 81b572b14c..659ef33ed3 100644 --- a/.github/workflows/e2e-code-bench-agent.yaml +++ b/.github/workflows/e2e-code-bench-agent.yaml @@ -53,11 +53,15 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + uses: ./.github/workflows/_detect-ci-container.yml + grpc-sequential: name: grpc-sequential runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - uses: actions/checkout@v4 @@ -87,8 +91,9 @@ jobs: grpc-stream: name: grpc-stream runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/helm-lint.yml b/.github/workflows/helm-lint.yml index 49aef39f15..87cac5be5d 100644 --- a/.github/workflows/helm-lint.yml +++ b/.github/workflows/helm-lint.yml @@ -26,11 +26,15 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + uses: ./.github/workflows/_detect-ci-container.yml + lint-vald-chart: name: lint for vald chart runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - name: Check out code. uses: actions/checkout@v4 @@ -54,8 +58,9 @@ jobs: lint-vald-helm-operator-chart: name: lint for vald-helm-operator chart runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - name: Check out code. uses: actions/checkout@v4 @@ -79,6 +84,9 @@ jobs: lint-values-schema: name: lint for values schema runs-on: ubuntu-latest + needs: [detect-ci-container] + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - name: Check out code. uses: actions/checkout@v4 From c41d17da60de0c2b6d8e6f18d7c47070c349588d Mon Sep 17 00:00:00 2001 From: hlts2 Date: Mon, 29 Jan 2024 16:37:53 +0900 Subject: [PATCH 2/2] fix: use container image tag Signed-off-by: hlts2 --- .github/workflows/build-binaries.yml | 6 +++++- .github/workflows/build-protobuf.yml | 6 +++++- .github/workflows/codeql-analysis.yml | 6 +++++- .github/workflows/coverage.yml | 6 +++++- .github/workflows/fossa.yml | 7 +++++-- .github/workflows/helm.yml | 6 +++++- .github/workflows/reviewdog-k8s.yml | 12 +++++++++--- .github/workflows/reviewdog.yml | 6 +++++- 8 files changed, 44 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 4a98c9e045..594b196beb 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -26,10 +26,14 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + uses: ./.github/workflows/_detect-ci-container.yml + build-linux: runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/build-protobuf.yml b/.github/workflows/build-protobuf.yml index 4a3cc0df0d..c77aac966d 100644 --- a/.github/workflows/build-protobuf.yml +++ b/.github/workflows/build-protobuf.yml @@ -35,10 +35,14 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + uses: ./.github/workflows/_detect-ci-container.yml + build: runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3c02a4aaf5..71e4b58133 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -43,11 +43,15 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + uses: ./.github/workflows/_detect-ci-container.yml + codeql-build: name: CodeQL runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f1e7a8c3e0..65956dcc74 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -37,10 +37,14 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + uses: ./.github/workflows/_detect-ci-container.yml + coverage: runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index 8bb9190eab..689a3ec9b9 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -30,12 +30,15 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + uses: ./.github/workflows/_detect-ci-container.yml + fossa-scan: name: "trigger FOSSA scan" - needs: [dump-contexts-to-log] runs-on: ubuntu-latest + needs: [dump-contexts-to-log, detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index 7e26021309..9e8421a598 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -29,11 +29,15 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + uses: ./.github/workflows/_detect-ci-container.yml + update-helm-chart: name: Update Helm chart runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/reviewdog-k8s.yml b/.github/workflows/reviewdog-k8s.yml index d5e746c148..f7310207a9 100644 --- a/.github/workflows/reviewdog-k8s.yml +++ b/.github/workflows/reviewdog-k8s.yml @@ -28,11 +28,15 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + uses: ./.github/workflows/_detect-ci-container.yml + kubeval-conflint: name: runner / kubeval-conflint runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: mumoshu/conflint:latest + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - uses: actions/checkout@v4 @@ -53,8 +57,9 @@ jobs: kubelinter-k8s-manifests: name: runner / kubelinter runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - uses: actions/checkout@v4 @@ -74,8 +79,9 @@ jobs: kubelinter-vald-chart: name: runner / kubelinter for vald chart runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 07d627fbd0..a8238a16b8 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -27,11 +27,15 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + uses: ./.github/workflows/_detect-ci-container.yml + golangci-lint: name: runner / golangci-lint runs-on: ubuntu-latest + needs: [detect-ci-container] container: - image: ghcr.io/vdaas/vald/vald-ci-container:nightly + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }} steps: - uses: actions/checkout@v4