Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] .github/workflows: use treeless-checkout-action
Date: Sat, 28 Jan 2023 14:14:43 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41912@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

There is a new pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages checkout-action
https://github.com/void-linux/void-packages/pull/41912

.github/workflows: use treeless-checkout-action
marking as draft until the action is in the proper namespace

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**
    - build: https://github.com/classabbyamp/void-packages/actions/runs/4031820870
    - cycle check: https://github.com/classabbyamp/void-packages/actions/runs/4031941184



A patch file from https://github.com/void-linux/void-packages/pull/41912.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-checkout-action-41912.patch --]
[-- Type: text/x-diff, Size: 4181 bytes --]

From 5170045fd4fccc654dc097ae813941d69c0a8152 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
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: |

             reply	other threads:[~2023-01-28 13:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28 13:14 classabbyamp [this message]
2023-01-30  2:54 ` [PR PATCH] [Merged]: " the-maldridge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41912@inbox.vuxu.org \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).