Skip to content

Commit

Permalink
remove extra steps
Browse files Browse the repository at this point in the history
  • Loading branch information
asr2003 authored Jun 2, 2024
1 parent 63d60ce commit 8ebf405
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/knative-downstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,11 @@ jobs:
path: downstream
continue-on-error: true

- name: Set branch to main if checkout fails
if: steps.checkout-downstream.outcome == 'failure'
run: echo "BRANCH=main" >> $GITHUB_ENV

- name: Set branch to PR base ref if checkout succeeds
if: steps.checkout-downstream.outcome == 'success'
run: echo "BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV

- name: Checkout downstream with fallback branch
if: steps.checkout-downstream.outcome == 'failure'
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH }}
ref: main
repository: ${{ matrix.repo }}
path: downstream

Expand Down

0 comments on commit 8ebf405

Please sign in to comment.