Skip to content

Commit

Permalink
avoid doubled checkout
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik <[email protected]>
  • Loading branch information
Dominik-K committed Dec 23, 2023
1 parent 90f4781 commit 7efd158
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,13 @@ jobs:
restore-keys: |
compile-${{ env.branch_name_for_cache }}-
compile-
- name: Checkout from `everest-core` the `.ci/` directory (reusable workflow mode, see https://stackoverflow.com/a/74123003/1168315)
- name: Checkout `everest-core` (to only get the `.ci/` directory if reusable workflow mode, see https://stackoverflow.com/a/74123003/1168315)
uses: actions/checkout@v4
with:
sparse-checkout: |
.ci
repository: EVerest/everest-core
ref: CI/reusable-workflow # TODO get reference in general, see https://stackoverflow.com/questions/74784735 resp. https://github.com/actions/toolkit/issues/1264
- name: Move `.ci/` to `/tmp` and remove `everest-core`
run: |
mv .ci /tmp
pwd && ls -hal .
cd ..
pwd && ls -hal .
rm -rf everest-core
pwd && ls -hal .
- name: Checkout repo ${{ inputs.repository || 'EVerest/everest-core' }}
- name: Checkout repo ${{ inputs.repository }}
if: ${{ github.repository != EVerest/everest-core }}
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
Expand Down

0 comments on commit 7efd158

Please sign in to comment.