From 5170045fd4fccc654dc097ae813941d69c0a8152 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 28 Jan 2023 06:46:52 -0500 Subject: [PATCH] .github/workflows: use treeless-checkout-action --- .github/workflows/build.yaml | 34 ++-------------------------------- .github/workflows/cycles.yml | 17 +---------------- 2 files changed, 3 insertions(+), 48 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2a89fd11cd0e..22cbaa0a1ffe 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,22 +27,7 @@ jobs: steps: - name: Clone and checkout - run: | - REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;') - /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m' - git clone --progress --no-checkout --filter=tree:0 \ - "${{ github.server_url }}/${{ github.repository }}" "$PWD" - git config --global --add gc.auto 0 - git config --global --add safe.directory "$PWD" - echo "::endgroup::" - /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m' - git fetch --prune --progress --filter=tree:0 origin \ - +refs/heads/*:refs/remotes/origin/* \ - +${{ github.ref }}:"${REMOTE_REF}" - echo "::endgroup::" - /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m' - git checkout --progress --force "${REMOTE_REF}" - echo "::endgroup::" + uses: classabbyamp/treeless-checkout-action@v1 - run: common/travis/changed_templates.sh - run: common/travis/fetch-xbps.sh - run: common/travis/fetch-xtools.sh @@ -87,22 +72,7 @@ jobs: xbps-install -yu - name: Clone and checkout - run: | - REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;') - /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m' - git clone --progress --no-checkout --filter=tree:0 \ - "${{ github.server_url }}/${{ github.repository }}" "$PWD" - git config --global --add gc.auto 0 - git config --global --add safe.directory "$PWD" - echo "::endgroup::" - /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m' - git fetch --prune --progress --filter=tree:0 origin \ - +refs/heads/*:refs/remotes/origin/* \ - +${{ github.ref }}:"${REMOTE_REF}" - echo "::endgroup::" - /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m' - git checkout --progress --force "${REMOTE_REF}" - echo "::endgroup::" + uses: classabbyamp/treeless-checkout-action@v1 - name: Create hostrepo and prepare masterdir run: | ln -s "$(pwd)" /hostrepo && diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml index be631da5f274..4c3aeb42cc2b 100644 --- a/.github/workflows/cycles.yml +++ b/.github/workflows/cycles.yml @@ -27,22 +27,7 @@ jobs: xbps-install -y python3-networkx github-cli - name: Clone and checkout - run: | - REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;') - /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m' - git clone --progress --no-checkout --filter=tree:0 \ - "${{ github.server_url }}/${{ github.repository }}" "$PWD" - git config --global --add gc.auto 0 - git config --global --add safe.directory "$PWD" - echo "::endgroup::" - /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m' - git fetch --prune --progress --filter=tree:0 origin \ - +refs/heads/*:refs/remotes/origin/* \ - +${{ github.ref }}:"${REMOTE_REF}" - echo "::endgroup::" - /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m' - git checkout --progress --force "${REMOTE_REF}" - echo "::endgroup::" + uses: classabbyamp/treeless-checkout-action@v1 - name: Create hostrepo and prepare masterdir run: |