From 6a39b8d242a19d2a8beb2739ae65617558a78a67 Mon Sep 17 00:00:00 2001 From: Marco Romano Date: Wed, 21 Jun 2023 11:12:47 +0200 Subject: [PATCH] Use github action that caches LFS files when checking out the repo (#647) Uses https://github.com/nschloe/action-cached-lfs-checkout where we're using git-lfs. This is a wrapper around `actions/checkout@v3` which uses `actions/cache@v3` to cache the files on LFS to avoid downloading them every time and spare LFS bandwidth. --- .github/workflows/nightlyReports.yml | 4 +--- .github/workflows/recordScreenshots.yml | 3 +-- .github/workflows/tests.yml | 3 +-- .github/workflows/validate-lfs.yml | 4 +--- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/nightlyReports.yml b/.github/workflows/nightlyReports.yml index fad1e4a426..240a9f7cd7 100644 --- a/.github/workflows/nightlyReports.yml +++ b/.github/workflows/nightlyReports.yml @@ -18,9 +18,7 @@ jobs: if: ${{ github.repository == 'vector-im/element-x-android' }} steps: - name: ⏬ Checkout with LFS - uses: actions/checkout@v3 - with: - lfs: 'true' + uses: nschloe/action-cached-lfs-checkout@v1.2.1 - name: Use JDK 17 uses: actions/setup-java@v3 diff --git a/.github/workflows/recordScreenshots.yml b/.github/workflows/recordScreenshots.yml index 1790bb2a8d..8803ef156d 100644 --- a/.github/workflows/recordScreenshots.yml +++ b/.github/workflows/recordScreenshots.yml @@ -14,10 +14,9 @@ jobs: steps: - name: ⏬ Checkout with LFS - uses: actions/checkout@v3 + uses: nschloe/action-cached-lfs-checkout@v1.2.1 with: persist-credentials: false - lfs: 'true' - name: ☕️ Use JDK 17 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3e9dbab5c6..a65c78c7a2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,12 +22,11 @@ jobs: cancel-in-progress: true steps: - name: ⏬ Checkout with LFS - uses: actions/checkout@v3 + uses: nschloe/action-cached-lfs-checkout@v1.2.1 with: # Ensure we are building the branch and not the branch after being merged on develop # https://github.com/actions/checkout/issues/881 ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} - lfs: 'true' - name: ☕️ Use JDK 17 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/validate-lfs.yml b/.github/workflows/validate-lfs.yml index 417b95ce2c..25fe50359c 100644 --- a/.github/workflows/validate-lfs.yml +++ b/.github/workflows/validate-lfs.yml @@ -7,9 +7,7 @@ jobs: runs-on: ubuntu-latest name: Validate steps: - - uses: actions/checkout@v3 - with: - lfs: 'true' + - uses: nschloe/action-cached-lfs-checkout@v1.2.1 - run: | ./tools/git/validate_lfs.sh