diff --git a/.github/workflows/run-upgrade-tests-reusable.yaml b/.github/workflows/run-upgrade-tests-reusable.yaml index ff7388a1..c1b7f667 100644 --- a/.github/workflows/run-upgrade-tests-reusable.yaml +++ b/.github/workflows/run-upgrade-tests-reusable.yaml @@ -31,10 +31,16 @@ jobs: env: BACKEND_TYPE: NATS steps: - - name: Pre-upgrade checkout + - name: Checkout uses: actions/checkout@v4 - with: - ref: ${{ inputs.pre-upgrade-branch }} + - name: Pre-upgrade checkout + run: | + # uses pre-upgrade-image-tag if pre-upgrade-branch is not provided + if [ -z "${{ inputs.pre-upgrade-branch }}" ]; then + git checkout -b ${{ inputs.pre-upgrade-image-tag }} + else + git checkout ${{ inputs.pre-upgrade-branch }} + fi - name: Install k3d tools run: make -C hack/ci/ install-k3d-tools @@ -86,9 +92,13 @@ jobs: GITHUB_REPO: "eventing-manager" - name: Post-upgrade checkout - uses: actions/checkout@v4 - with: - ref: ${{ inputs.post-upgrade-branch }} + run: | + # uses post-upgrade-image-tag if post-upgrade-branch is not provided + if [ -z "${{ inputs.post-upgrade-branch }}" ]; then + git checkout -b ${{ inputs.post-upgrade-image-tag }} + else + git checkout ${{ inputs.post-upgrade-branch }} + fi - name: Install Eventing manager after Upgrade run: |