Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] ci: update actions/checkout to v3
Date: Fri, 16 Sep 2022 06:20:40 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39310@inbox.vuxu.org> (raw)

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

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

https://github.com/classabbyamp/void-packages ci/safe-dir
https://github.com/void-linux/void-packages/pull/39310

ci: update actions/checkout to v3
`actions/checkout@v3` adds a configuration option to set the checkout dir as a safe directory, a security feature added in git 2.35.2

```yaml
# Add repository path as safe.directory for Git global config by running `git
# config --global --add safe.directory <path>`
# Default: true
set-safe-directory: ''
```

This is set to true by default so we shouldn't need to specify it.

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**



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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/safe-dir-39310.patch --]
[-- Type: text/x-diff, Size: 3184 bytes --]

From cf75a46f330b7bb44a86537962052c2bf4f6ade4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Sep 2022 00:14:21 -0400
Subject: [PATCH 1/3] .github/workflows/build.yaml: update actions/checkout

---
 .github/workflows/build.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index ce995e2d9c79..a41a647da757 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,7 +26,7 @@ jobs:
       LICENSE_LIST: common/travis/license.lst
 
     steps:
-      - uses: actions/checkout@v1
+      - uses: actions/checkout@v3
         with:
           fetch-depth: 200
       - run: common/travis/fetch_upstream.sh
@@ -73,7 +73,7 @@ jobs:
           # Upgrade again (in case there was a xbps update)
           xbps-install -yu
 
-      - uses: actions/checkout@v1
+      - uses: actions/checkout@v3
         with:
           fetch-depth: 200
       - name: Create hostrepo and prepare masterdir

From 4fac459c7153f7196dbfddcac6f95bbfe4ae0614 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Sep 2022 00:14:45 -0400
Subject: [PATCH 2/3] .github/workflows/cycles.yml: update actions/checkout

manually setting safe.directory is no longer necessary
---
 .github/workflows/cycles.yml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 3f85ac6fa74a..d7ab9e0d3390 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -23,7 +23,7 @@ jobs:
           xbps-install -yu
           # Install script dependencies
           xbps-install -y python3-networkx github-cli
-      - uses: actions/checkout@v1
+      - uses: actions/checkout@v3
         with:
           fetch-depth: 1
       - name: Create hostrepo and prepare masterdir
@@ -38,8 +38,6 @@ jobs:
          elif command -v git >/dev/null 2>&1; then
             GIT_CMD=$(command -v git)
          fi
-         # required by git 2.35.2+
-         $GIT_CMD config --global --add safe.directory "$PWD"
          common/scripts/xbps-cycles.py | tee cycles
          grep 'Cycle:' cycles | while read -r line; do
              if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then

From e6840d8050bd93d93824ec66d20847372a3bd8b0 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Sep 2022 00:15:51 -0400
Subject: [PATCH 3/3] common/travis/fetch_upstream.sh: remove unnecessary git
 config

no longer needed with actions/checkout@v3
---
 common/travis/fetch_upstream.sh | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index 049cfd69e54d..45315563e0b1 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -8,8 +8,5 @@ elif command -v git >/dev/null 2>&1; then
 	GIT_CMD=$(command -v git)
 fi
 
-# required by git 2.35.2+
-$GIT_CMD config --global --add safe.directory "$PWD"
-
 /bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
 $GIT_CMD fetch --depth 200 https://github.com/void-linux/void-packages.git master

             reply	other threads:[~2022-09-16  4:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16  4:20 classabbyamp [this message]
2022-09-16  4:21 ` [PR PATCH] [Updated] " classabbyamp
2022-09-16  5:03 ` classabbyamp
2022-09-16  5:10 ` [PR PATCH] [Updated] ci: update actions/checkout to v3, simplify git finding logic classabbyamp
2022-09-16  5:15 ` classabbyamp
2022-09-16  5:38 ` classabbyamp
2022-09-16  5:40 ` classabbyamp
2022-09-16  5:43 ` classabbyamp
2022-09-16  6:02 ` classabbyamp
2022-09-16  6:02 ` [PR PATCH] [Closed]: " classabbyamp

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-39310@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).