Skip to content

Commit c981c45

Browse files
author
Itxaka
authored
Tag create-repo and publish-repo repositories (#1312)
1 parent 6140dba commit c981c45

32 files changed

+293
-2
lines changed

.github/build.yaml.gomplate

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@
6767

6868
{{{ end }}}
6969

70+
{{{define "git_permissions" }}}
71+
- name: Fix git permissions for CVE-2022-24765
72+
# This fixes running git commands on our git directory under sudo user
73+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
74+
run: |
75+
sudo git config --global --add safe.directory ${{ github.workspace }}
76+
git config --global --add safe.directory ${{ github.workspace }}
77+
{{{ end }}}
78+
7079
{{{define "make"}}}
7180
{{{ $config := (datasource "config") }}}
7281
{{{ $target := . }}}
@@ -199,6 +208,7 @@
199208
sudo -E .github/append_manifests.py build/$BASE_NAME.metadata.yaml $f mtree
200209
done
201210
{{{- end }}}
211+
{{{ tmpl.Exec "git_permissions" }}}
202212
{{{ tmpl.Exec "make" "create-repo" }}}
203213
- name: Upload results
204214
uses: actions/upload-artifact@v2
@@ -597,6 +607,7 @@
597607
popd
598608
sudo -E ./.github/build
599609
ls -liah $PWD/build
610+
{{{ tmpl.Exec "git_permissions" }}}
600611
- name: Publish to DockerHub 🚀
601612
run: |
602613
sudo -E make publish-repo

.github/workflows/build-master-blue-arm64.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ jobs:
8989
BASE_NAME=`basename -s .package.tar.zst.mtree $f`
9090
sudo -E .github/append_manifests.py build/$BASE_NAME.metadata.yaml $f mtree
9191
done
92+
- name: Fix git permissions for CVE-2022-24765
93+
# This fixes running git commands on our git directory under sudo user
94+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
95+
run: |
96+
sudo git config --global --add safe.directory ${{ github.workspace }}
97+
git config --global --add safe.directory ${{ github.workspace }}
9298
- name: Run make create-repo
9399
run: |
94100
sudo -E make create-repo
@@ -215,6 +221,12 @@ jobs:
215221
popd
216222
sudo -E ./.github/build
217223
ls -liah $PWD/build
224+
- name: Fix git permissions for CVE-2022-24765
225+
# This fixes running git commands on our git directory under sudo user
226+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
227+
run: |
228+
sudo git config --global --add safe.directory ${{ github.workspace }}
229+
git config --global --add safe.directory ${{ github.workspace }}
218230
- name: Publish to DockerHub 🚀
219231
run: |
220232
sudo -E make publish-repo

.github/workflows/build-master-blue-x86_64.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ jobs:
8787
BASE_NAME=`basename -s .package.tar.zst.mtree $f`
8888
sudo -E .github/append_manifests.py build/$BASE_NAME.metadata.yaml $f mtree
8989
done
90+
- name: Fix git permissions for CVE-2022-24765
91+
# This fixes running git commands on our git directory under sudo user
92+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
93+
run: |
94+
sudo git config --global --add safe.directory ${{ github.workspace }}
95+
git config --global --add safe.directory ${{ github.workspace }}
9096
- name: Run make create-repo
9197
run: |
9298
sudo -E make create-repo
@@ -213,6 +219,12 @@ jobs:
213219
popd
214220
sudo -E ./.github/build
215221
ls -liah $PWD/build
222+
- name: Fix git permissions for CVE-2022-24765
223+
# This fixes running git commands on our git directory under sudo user
224+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
225+
run: |
226+
sudo git config --global --add safe.directory ${{ github.workspace }}
227+
git config --global --add safe.directory ${{ github.workspace }}
216228
- name: Publish to DockerHub 🚀
217229
run: |
218230
sudo -E make publish-repo

.github/workflows/build-master-green-arm64.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ jobs:
8989
BASE_NAME=`basename -s .package.tar.zst.mtree $f`
9090
sudo -E .github/append_manifests.py build/$BASE_NAME.metadata.yaml $f mtree
9191
done
92+
- name: Fix git permissions for CVE-2022-24765
93+
# This fixes running git commands on our git directory under sudo user
94+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
95+
run: |
96+
sudo git config --global --add safe.directory ${{ github.workspace }}
97+
git config --global --add safe.directory ${{ github.workspace }}
9298
- name: Run make create-repo
9399
run: |
94100
sudo -E make create-repo
@@ -562,6 +568,12 @@ jobs:
562568
popd
563569
sudo -E ./.github/build
564570
ls -liah $PWD/build
571+
- name: Fix git permissions for CVE-2022-24765
572+
# This fixes running git commands on our git directory under sudo user
573+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
574+
run: |
575+
sudo git config --global --add safe.directory ${{ github.workspace }}
576+
git config --global --add safe.directory ${{ github.workspace }}
565577
- name: Publish to DockerHub 🚀
566578
run: |
567579
sudo -E make publish-repo

.github/workflows/build-master-green-x86_64.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ jobs:
8787
BASE_NAME=`basename -s .package.tar.zst.mtree $f`
8888
sudo -E .github/append_manifests.py build/$BASE_NAME.metadata.yaml $f mtree
8989
done
90+
- name: Fix git permissions for CVE-2022-24765
91+
# This fixes running git commands on our git directory under sudo user
92+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
93+
run: |
94+
sudo git config --global --add safe.directory ${{ github.workspace }}
95+
git config --global --add safe.directory ${{ github.workspace }}
9096
- name: Run make create-repo
9197
run: |
9298
sudo -E make create-repo
@@ -786,6 +792,12 @@ jobs:
786792
popd
787793
sudo -E ./.github/build
788794
ls -liah $PWD/build
795+
- name: Fix git permissions for CVE-2022-24765
796+
# This fixes running git commands on our git directory under sudo user
797+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
798+
run: |
799+
sudo git config --global --add safe.directory ${{ github.workspace }}
800+
git config --global --add safe.directory ${{ github.workspace }}
789801
- name: Publish to DockerHub 🚀
790802
run: |
791803
sudo -E make publish-repo

.github/workflows/build-master-orange-arm64.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ jobs:
9191
BASE_NAME=`basename -s .package.tar.zst.mtree $f`
9292
sudo -E .github/append_manifests.py build/$BASE_NAME.metadata.yaml $f mtree
9393
done
94+
- name: Fix git permissions for CVE-2022-24765
95+
# This fixes running git commands on our git directory under sudo user
96+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
97+
run: |
98+
sudo git config --global --add safe.directory ${{ github.workspace }}
99+
git config --global --add safe.directory ${{ github.workspace }}
94100
- name: Run make create-repo
95101
run: |
96102
sudo -E make create-repo
@@ -217,6 +223,12 @@ jobs:
217223
popd
218224
sudo -E ./.github/build
219225
ls -liah $PWD/build
226+
- name: Fix git permissions for CVE-2022-24765
227+
# This fixes running git commands on our git directory under sudo user
228+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
229+
run: |
230+
sudo git config --global --add safe.directory ${{ github.workspace }}
231+
git config --global --add safe.directory ${{ github.workspace }}
220232
- name: Publish to DockerHub 🚀
221233
run: |
222234
sudo -E make publish-repo

.github/workflows/build-master-orange-x86_64.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ jobs:
8787
BASE_NAME=`basename -s .package.tar.zst.mtree $f`
8888
sudo -E .github/append_manifests.py build/$BASE_NAME.metadata.yaml $f mtree
8989
done
90+
- name: Fix git permissions for CVE-2022-24765
91+
# This fixes running git commands on our git directory under sudo user
92+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
93+
run: |
94+
sudo git config --global --add safe.directory ${{ github.workspace }}
95+
git config --global --add safe.directory ${{ github.workspace }}
9096
- name: Run make create-repo
9197
run: |
9298
sudo -E make create-repo
@@ -213,6 +219,12 @@ jobs:
213219
popd
214220
sudo -E ./.github/build
215221
ls -liah $PWD/build
222+
- name: Fix git permissions for CVE-2022-24765
223+
# This fixes running git commands on our git directory under sudo user
224+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
225+
run: |
226+
sudo git config --global --add safe.directory ${{ github.workspace }}
227+
git config --global --add safe.directory ${{ github.workspace }}
216228
- name: Publish to DockerHub 🚀
217229
run: |
218230
sudo -E make publish-repo

.github/workflows/build-master-teal-arm64.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ jobs:
8989
BASE_NAME=`basename -s .package.tar.zst.mtree $f`
9090
sudo -E .github/append_manifests.py build/$BASE_NAME.metadata.yaml $f mtree
9191
done
92+
- name: Fix git permissions for CVE-2022-24765
93+
# This fixes running git commands on our git directory under sudo user
94+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
95+
run: |
96+
sudo git config --global --add safe.directory ${{ github.workspace }}
97+
git config --global --add safe.directory ${{ github.workspace }}
9298
- name: Run make create-repo
9399
run: |
94100
sudo -E make create-repo
@@ -215,6 +221,12 @@ jobs:
215221
popd
216222
sudo -E ./.github/build
217223
ls -liah $PWD/build
224+
- name: Fix git permissions for CVE-2022-24765
225+
# This fixes running git commands on our git directory under sudo user
226+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
227+
run: |
228+
sudo git config --global --add safe.directory ${{ github.workspace }}
229+
git config --global --add safe.directory ${{ github.workspace }}
218230
- name: Publish to DockerHub 🚀
219231
run: |
220232
sudo -E make publish-repo

.github/workflows/build-master-teal-x86_64.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ jobs:
8787
BASE_NAME=`basename -s .package.tar.zst.mtree $f`
8888
sudo -E .github/append_manifests.py build/$BASE_NAME.metadata.yaml $f mtree
8989
done
90+
- name: Fix git permissions for CVE-2022-24765
91+
# This fixes running git commands on our git directory under sudo user
92+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
93+
run: |
94+
sudo git config --global --add safe.directory ${{ github.workspace }}
95+
git config --global --add safe.directory ${{ github.workspace }}
9096
- name: Run make create-repo
9197
run: |
9298
sudo -E make create-repo
@@ -213,6 +219,12 @@ jobs:
213219
popd
214220
sudo -E ./.github/build
215221
ls -liah $PWD/build
222+
- name: Fix git permissions for CVE-2022-24765
223+
# This fixes running git commands on our git directory under sudo user
224+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
225+
run: |
226+
sudo git config --global --add safe.directory ${{ github.workspace }}
227+
git config --global --add safe.directory ${{ github.workspace }}
216228
- name: Publish to DockerHub 🚀
217229
run: |
218230
sudo -E make publish-repo

.github/workflows/build-nightly-blue-x86_64.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ jobs:
7676
sudo -E ./.github/build
7777
ls -liah $PWD/build
7878
sudo chmod -R 777 $PWD/build
79+
- name: Fix git permissions for CVE-2022-24765
80+
# This fixes running git commands on our git directory under sudo user
81+
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/ for more info
82+
run: |
83+
sudo git config --global --add safe.directory ${{ github.workspace }}
84+
git config --global --add safe.directory ${{ github.workspace }}
7985
- name: Run make create-repo
8086
run: |
8187
sudo -E make create-repo

0 commit comments

Comments
 (0)