From c4c9247b4df516d440a5b2db2a31c42975f233ab Mon Sep 17 00:00:00 2001 From: Feny Mehta Date: Mon, 3 Jun 2024 15:42:13 +0530 Subject: [PATCH] Investigate the github workflow for cross repo dependencies Signed-off-by: Feny Mehta --- .../ci-check-cross-repo-dependencies.yml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci-check-cross-repo-dependencies.yml diff --git a/.github/workflows/ci-check-cross-repo-dependencies.yml b/.github/workflows/ci-check-cross-repo-dependencies.yml new file mode 100644 index 00000000..028fc3fa --- /dev/null +++ b/.github/workflows/ci-check-cross-repo-dependencies.yml @@ -0,0 +1,39 @@ +name: Check cross repo dependencies + +on: # yamllint disable-line rule:truthy + pull_request: + branches: + - master + +jobs: + replaces: + name: Check cross repo dependencies + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - repo: toolchain-e2e + - repo: host-operator + + + steps: + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.20" + + # https://github.com/actions/checkout + #- name: Checkout Git Repository + # uses: actions/checkout@v4 + # with: + # repository: ${{ matrix.repo }} + + - name: Run check + id: check-${{ matrix.repo }} + run: | + set -e -o pipefail + git clone --depth 1 ${{ matrix.repo }} + cd ${{ matrix.repo }} + go edit -replace https://github.com/codeready-toolchain/toolchain-common=https://github.com/${GITHUB_REPOSITORY}@${GITHUB_REF} + go mod tidy + go vet ./... || true \ No newline at end of file