Skip to content

Commit

Permalink
[GithubActions] Simplify checkout action (#629)
Browse files Browse the repository at this point in the history
Checkout action introduced number of improvements simplifying checkout of submodules and fetch of all history for all tags and branches:
- actions/checkout#258
- actions/checkout#173
  • Loading branch information
valfirst committed May 30, 2020
1 parent 67829a8 commit 52c2f2b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/gradle.yml
Expand Up @@ -20,16 +20,11 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v2
- name: Checkout (including submodules and tags)
shell: bash
# Fetch all history for all tags and branches: https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
# Checkout submodules: https://github.com/actions/checkout#checkout-submodules
run: |
git fetch --prune --unshallow
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

- name: Cache ~/.gradle/caches
uses: actions/cache@v2
Expand Down

0 comments on commit 52c2f2b

Please sign in to comment.