From 00aebe19147bb3237d3186841817823ed68348f0 Mon Sep 17 00:00:00 2001 From: Yan Date: Wed, 2 Aug 2023 16:10:47 -0700 Subject: [PATCH] fix ci for forked repo (#186) * fix ci * fix * fix * fix * fix * test * test --------- Co-authored-by: Yan Chen --- .github/workflows/backend.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index a2824107..cc21c7b4 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -14,13 +14,10 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.14.2 + DFX_VERSION: 0.14.3 IC_REPL_VERSION: 0.4.1 - MOC_VERSION: 0.9.5 + MOC_VERSION: 0.9.7 steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - name: Setup Rust uses: actions-rs/toolchain@v1 with: @@ -53,12 +50,16 @@ jobs: - name: Start dfx run: | dfx start --background + - name: Checkout base branch + if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking_changes') + uses: actions/checkout@v3 + with: + ref: ${{ github.base_ref }} - name: Deploy main branch if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking_changes') run: | - git checkout main dfx deploy backend - git checkout ${GITHUB_HEAD_REF} + - uses: actions/checkout@v3 - name: Deploy current branch run: dfx deploy backend - name: CanisterPool test