Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
fetch only the necessary commits
Browse files Browse the repository at this point in the history
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
  • Loading branch information
M. Fatih Cırıt committed Jun 12, 2024
1 parent 2955a46 commit 368b4bd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build-and-test-differential-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ jobs:
container: ros:humble
build-depends-repos: build_depends.repos
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"

- name: Checkout PR branch and all PR commits
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}

- name: Remove exec_depend
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/build-and-test-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ jobs:
container: ros:humble
build-depends-repos: build_depends.repos
steps:
- name: Check out repository
- name: Set PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"

- name: Checkout PR branch and all PR commits
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}

- name: Show disk space before the tasks
run: df -h
Expand Down

0 comments on commit 368b4bd

Please sign in to comment.