Skip to content

Commit f2bc02f

Browse files
committed
ci: replace SSH deploy key with MY_REPO_PAT for submodule auth
mazduino org policy blocks adding SSH deploy keys to repositories. Replace webfactory/ssh-agent + RUSEFI_CORE_DEPLOY_KEY with git URL rewrite using MY_REPO_PAT across all three workflows that need the mazduino/rusefi-core submodule.
1 parent 1873889 commit f2bc02f

3 files changed

Lines changed: 20 additions & 25 deletions

File tree

.github/workflows/build-matrix.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ jobs:
1111
outputs:
1212
matrix: ${{ steps.set-matrix.outputs.matrix }}
1313
steps:
14-
- uses: webfactory/ssh-agent@v0.9.0
15-
with:
16-
ssh-private-key: ${{ secrets.RUSEFI_CORE_DEPLOY_KEY }}
17-
1814
- uses: actions/checkout@v4
1915
with:
2016
submodules: false
17+
token: ${{ secrets.MY_REPO_PAT }}
2118

2219
- name: Checkout submodules
23-
run: git submodule update --init --force --depth=1
20+
run: |
21+
git config --global url."https://x-access-token:${{ secrets.MY_REPO_PAT }}@github.com/".insteadOf "git@github.com:"
22+
git submodule update --init --force --depth=1
2423
2524
- name: Set matrix
2625
id: set-matrix
@@ -46,16 +45,15 @@ jobs:
4645
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
4746

4847
steps:
49-
- uses: webfactory/ssh-agent@v0.9.0
50-
with:
51-
ssh-private-key: ${{ secrets.RUSEFI_CORE_DEPLOY_KEY }}
52-
5348
- uses: actions/checkout@v4
5449
with:
5550
submodules: false
51+
token: ${{ secrets.MY_REPO_PAT }}
5652

5753
- name: Checkout submodules
58-
run: git submodule update --init --force --depth=1
54+
run: |
55+
git config --global url."https://x-access-token:${{ secrets.MY_REPO_PAT }}@github.com/".insteadOf "git@github.com:"
56+
git submodule update --init --force --depth=1
5957
6058
- name: Set run variables
6159
id: set-variables

.github/workflows/nightly-release.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@ jobs:
1616
matrix: ${{ steps.set-matrix.outputs.matrix }}
1717
tag: ${{ steps.set-tag.outputs.tag }}
1818
steps:
19-
- uses: webfactory/ssh-agent@v0.9.0
20-
with:
21-
ssh-private-key: ${{ secrets.RUSEFI_CORE_DEPLOY_KEY }}
22-
2319
- uses: actions/checkout@v4
2420
with:
2521
submodules: false
22+
token: ${{ secrets.MY_REPO_PAT }}
2623

2724
- name: Checkout submodules
28-
run: git submodule update --init --force --depth=1
25+
run: |
26+
git config --global url."https://x-access-token:${{ secrets.MY_REPO_PAT }}@github.com/".insteadOf "git@github.com:"
27+
git submodule update --init --force --depth=1
2928
3029
- name: Set matrix
3130
id: set-matrix
@@ -53,16 +52,15 @@ jobs:
5352
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
5453

5554
steps:
56-
- uses: webfactory/ssh-agent@v0.9.0
57-
with:
58-
ssh-private-key: ${{ secrets.RUSEFI_CORE_DEPLOY_KEY }}
59-
6055
- uses: actions/checkout@v4
6156
with:
6257
submodules: false
58+
token: ${{ secrets.MY_REPO_PAT }}
6359

6460
- name: Checkout submodules
65-
run: git submodule update --init --force --depth=1
61+
run: |
62+
git config --global url."https://x-access-token:${{ secrets.MY_REPO_PAT }}@github.com/".insteadOf "git@github.com:"
63+
git submodule update --init --force --depth=1
6664
6765
- uses: ./ext/rusefi/.github/workflows/custom-board-build
6866
with:

.github/workflows/unit-tests.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,15 @@ jobs:
2121
- mazduino-mega100-512
2222

2323
steps:
24-
- uses: webfactory/ssh-agent@v0.9.0
25-
with:
26-
ssh-private-key: ${{ secrets.RUSEFI_CORE_DEPLOY_KEY }}
27-
2824
- uses: actions/checkout@v4
2925
with:
3026
submodules: false
27+
token: ${{ secrets.MY_REPO_PAT }}
3128

3229
- name: Checkout submodules
33-
run: git submodule update --init --force --depth=1
30+
run: |
31+
git config --global url."https://x-access-token:${{ secrets.MY_REPO_PAT }}@github.com/".insteadOf "git@github.com:"
32+
git submodule update --init --force --depth=1
3433
3534
- name: Checkout rusefi submodules
3635
run: git -C ext/rusefi submodule update --init --force --depth=1

0 commit comments

Comments
 (0)