|
26 | 26 | runs-on: [self-hosted, ci] |
27 | 27 | needs: [parse-secrets] |
28 | 28 | steps: |
29 | | - - uses: actions/checkout@v4 |
| 29 | + - name: Checkout Branch |
| 30 | + id: checkout-build-branch |
| 31 | + uses: actions/checkout@v4 |
| 32 | + continue-on-error: true |
30 | 33 | with: |
31 | | - ref: ${{ env.BRANCH_NAME || 'main' }} |
| 34 | + ref: ${{ env.BRANCH_NAME }} |
| 35 | + - name: Fallback to main |
| 36 | + if: steps.checkout-build-branch.outcome == 'failure' |
| 37 | + uses: actions/checkout@v4 |
| 38 | + with: |
| 39 | + ref: main |
32 | 40 | - uses: ./.github/actions/make/ |
33 | 41 | with: |
34 | 42 | command: build |
|
39 | 47 | runs-on: [self-hosted, ci] |
40 | 48 | needs: [parse-secrets, build-base] |
41 | 49 | steps: |
42 | | - - uses: actions/checkout@v4 |
| 50 | + - name: Checkout Branch for destroy |
| 51 | + id: checkout-destroy-branch |
| 52 | + uses: actions/checkout@v4 |
| 53 | + continue-on-error: true |
| 54 | + with: |
| 55 | + ref: ${{ env.BRANCH_NAME }} |
| 56 | + - name: Fallback to main for destroy |
| 57 | + if: steps.checkout-destroy-branch.outcome == 'failure' |
| 58 | + uses: actions/checkout@v4 |
43 | 59 | with: |
44 | | - ref: ${{ env.BRANCH_NAME || 'main' }} |
| 60 | + ref: main |
45 | 61 | fetch-depth: 0 |
46 | 62 | - name: Remove PR workspaces |
47 | 63 | uses: ./.github/actions/make/ |
|
0 commit comments