Skip to content

Commit

Permalink
[CI] Improve devops/actions/cached_checkout (intel#9831)
Browse files Browse the repository at this point in the history
* Add ability to skip the merge
* Setup alternates on the filesystem level so that other jobs in the
workflow could work with GIT without setting the environment variable.
  • Loading branch information
aelovikov-intel authored and fineg74 committed Jun 15, 2023
1 parent b246ead commit 6b8f868
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion devops/actions/cached_checkout/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ inputs:
default_branch:
description: 'Name of the default branch'
default: 'sycl'
merge:
description: 'Merge default branch after the checkout'
default: true

runs:
using: 'composite'
Expand All @@ -41,10 +44,16 @@ runs:
ref: ${{ inputs.ref }}
path: ${{ inputs.path }}
fetch-depth: 0
- name: Merge sycl HEAD into current branch
- name: Setup alternates
shell: bash
env:
GIT_ALTERNATE_OBJECT_DIRECTORIES: ${{ inputs.cache_path }}/${{ inputs.repository }}/.git/objects
run: |
echo $GIT_ALTERNATE_OBJECT_DIRECTORIES > ${{ inputs.path }}/.git/objects/info/alternates
- name: Merge sycl HEAD into current branch
shell: bash
if: ${{ inputs.merge == 'true' }}
env:
DEFAULT_BRANCH: ${{ inputs.default_branch }}
run: |
cd ${{ inputs.path }}
Expand Down

0 comments on commit 6b8f868

Please sign in to comment.