[bootlin/training-materials updates] master_fix_action: github: add workaround for checkout issue (be615b66)

Clément Léger clement.leger at bootlin.com
Mon May 23 12:05:03 CEST 2022


Repository : https://github.com/bootlin/training-materials
On branch  : master_fix_action
Link       : https://github.com/bootlin/training-materials/commit/be615b667573c8a5edcaa72a37c4bf3f87ecb21a

>---------------------------------------------------------------

commit be615b667573c8a5edcaa72a37c4bf3f87ecb21a
Author: Clément Léger <clement.leger at bootlin.com>
Date:   Mon May 23 11:02:16 2022 +0200

    github: add workaround for checkout issue
    
    There seems to be a bug with v2 action when used with Ubuntu 20-04 [1].
    Unfortunately, there is no solution yet and a worarkound should be
    used.
    
    [1] https://github.com/actions/checkout/issues/760
    
    Signed-off-by: Clément Léger <clement.leger at bootlin.com>


>---------------------------------------------------------------

be615b667573c8a5edcaa72a37c4bf3f87ecb21a
 .github/actions/build-material-action/Dockerfile |  3 ++
 .github/workflows/training-materials.yml         | 36 ++++++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/.github/actions/build-material-action/Dockerfile b/.github/actions/build-material-action/Dockerfile
index acb9fbc3..f38060c0 100644
--- a/.github/actions/build-material-action/Dockerfile
+++ b/.github/actions/build-material-action/Dockerfile
@@ -39,6 +39,9 @@ RUN dnf -y update && \
 	texlive-makecell \
 	texlive-stmaryrd
 
+# Fix for: https://github.com/actions/checkout/issues/766 (git CVE-2022-24765)
+RUN git config --global --add safe.directory "$GITHUB_WORKSPACE"
+
 ENV HOME /tmp
 
 WORKDIR /training
diff --git a/.github/workflows/training-materials.yml b/.github/workflows/training-materials.yml
index 4a7f6e91..de918076 100644
--- a/.github/workflows/training-materials.yml
+++ b/.github/workflows/training-materials.yml
@@ -3,6 +3,10 @@ jobs:
   embedded-linux:
     runs-on: ubuntu-20.04
     steps:
+      # Workaround while github fixes this issue
+      # (https://github.com/actions/checkout/issues/760)
+      - name: work around permission issue
+        run: git config --global --add safe.directory /github/workspace
       - uses: actions/checkout at v2
       - uses: ./.github/actions/build-material-action
         with:
@@ -29,6 +33,10 @@ jobs:
   embedded-linux-ng:
     runs-on: ubuntu-20.04
     steps:
+      # Workaround while github fixes this issue
+      # (https://github.com/actions/checkout/issues/760)
+      - name: work around permission issue
+        run: git config --global --add safe.directory /github/workspace
       - uses: actions/checkout at v2
       - uses: ./.github/actions/build-material-action
         with:
@@ -41,6 +49,10 @@ jobs:
   linux-kernel:
     runs-on: ubuntu-20.04
     steps:
+      # Workaround while github fixes this issue
+      # (https://github.com/actions/checkout/issues/760)
+      - name: work around permission issue
+        run: git config --global --add safe.directory /github/workspace
       - uses: actions/checkout at v2
       - uses: ./.github/actions/build-material-action
         with:
@@ -56,6 +68,10 @@ jobs:
   buildroot:
     runs-on: ubuntu-20.04
     steps:
+      # Workaround while github fixes this issue
+      # (https://github.com/actions/checkout/issues/760)
+      - name: work around permission issue
+        run: git config --global --add safe.directory /github/workspace
       - uses: actions/checkout at v2
       - uses: ./.github/actions/build-material-action
         with:
@@ -74,6 +90,10 @@ jobs:
   yocto:
     runs-on: ubuntu-20.04
     steps:
+      # Workaround while github fixes this issue
+      # (https://github.com/actions/checkout/issues/760)
+      - name: work around permission issue
+        run: git config --global --add safe.directory /github/workspace
       - uses: actions/checkout at v2
       - uses: ./.github/actions/build-material-action
         with:
@@ -96,6 +116,10 @@ jobs:
   boot-time:
     runs-on: ubuntu-20.04
     steps:
+      # Workaround while github fixes this issue
+      # (https://github.com/actions/checkout/issues/760)
+      - name: work around permission issue
+        run: git config --global --add safe.directory /github/workspace
       - uses: actions/checkout at v2
       - uses: ./.github/actions/build-material-action
         with:
@@ -111,6 +135,10 @@ jobs:
   graphics:
     runs-on: ubuntu-20.04
     steps:
+      # Workaround while github fixes this issue
+      # (https://github.com/actions/checkout/issues/760)
+      - name: work around permission issue
+        run: git config --global --add safe.directory /github/workspace
       - uses: actions/checkout at v2
       - uses: ./.github/actions/build-material-action
         with:
@@ -124,6 +152,10 @@ jobs:
   autotools:
     runs-on: ubuntu-20.04
     steps:
+      # Workaround while github fixes this issue
+      # (https://github.com/actions/checkout/issues/760)
+      - name: work around permission issue
+        run: git config --global --add safe.directory /github/workspace
       - uses: actions/checkout at v2
       - uses: ./.github/actions/build-material-action
         with:
@@ -136,6 +168,10 @@ jobs:
   preempt-rt:
     runs-on: ubuntu-20.04
     steps:
+      # Workaround while github fixes this issue
+      # (https://github.com/actions/checkout/issues/760)
+      - name: work around permission issue
+        run: git config --global --add safe.directory /github/workspace
       - uses: actions/checkout at v2
       - uses: ./.github/actions/build-material-action
         with:




More information about the training-materials-updates mailing list