Skip to content

Commit f58e95e

Browse files
committed
Merge branch 'dev' into releases/v4
2 parents 4a3abc7 + f33629c commit f58e95e

File tree

12 files changed

+238
-43
lines changed

12 files changed

+238
-43
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v5.0.0
17+
uses: actions/checkout@v6.0.1
1818

19-
- uses: actions/setup-node@v6.0.0
19+
- uses: actions/setup-node@v6.1.0
2020
with:
2121
node-version-file: '.node-version'
2222
registry-url: 'https://registry.npmjs.org'
@@ -40,9 +40,9 @@ jobs:
4040
runs-on: ubuntu-latest
4141
steps:
4242
- name: Checkout
43-
uses: actions/checkout@v5.0.0
43+
uses: actions/checkout@v6.0.1
4444

45-
- uses: actions/setup-node@v6.0.0
45+
- uses: actions/setup-node@v6.1.0
4646
with:
4747
node-version-file: '.node-version'
4848
registry-url: 'https://registry.npmjs.org'
@@ -78,11 +78,11 @@ jobs:
7878
max-parallel: 1
7979
steps:
8080
- name: Checkout
81-
uses: actions/checkout@v5.0.0
81+
uses: actions/checkout@v6.0.1
8282
with:
8383
persist-credentials: false
8484

85-
- uses: actions/setup-node@v6.0.0
85+
- uses: actions/setup-node@v6.1.0
8686
with:
8787
node-version-file: '.node-version'
8888
registry-url: 'https://registry.npmjs.org'

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v5.0.0
11+
uses: actions/checkout@v6.0.1
1212

1313
# Workflow dispatch event that pushes the current version to the release branch.
1414
# From here the secondary production deployment workflow will trigger to build the dependencies.

.github/workflows/integration.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
apt-get update && apt-get install -y rsync
1616
1717
- name: Checkout
18-
uses: actions/checkout@v5.0.0
18+
uses: actions/checkout@v6.0.1
1919

2020
- name: Build and Deploy
2121
uses: JamesIves/github-pages-deploy-action@v4
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- name: Checkout
38-
uses: actions/checkout@v5.0.0
38+
uses: actions/checkout@v6.0.1
3939

4040
- name: Build and Deploy
4141
uses: JamesIves/github-pages-deploy-action@v4
@@ -58,7 +58,7 @@ jobs:
5858
runs-on: ubuntu-latest
5959
steps:
6060
- name: Checkout
61-
uses: actions/checkout@v5.0.0
61+
uses: actions/checkout@v6.0.1
6262
with:
6363
persist-credentials: false
6464

@@ -87,7 +87,7 @@ jobs:
8787
LANG: C.UTF-8
8888
steps:
8989
- name: Checkout
90-
uses: actions/checkout@v5.0.0
90+
uses: actions/checkout@v6.0.1
9191
with:
9292
persist-credentials: false
9393

@@ -116,7 +116,7 @@ jobs:
116116
runs-on: ubuntu-latest
117117
steps:
118118
- name: Checkout
119-
uses: actions/checkout@v5.0.0
119+
uses: actions/checkout@v6.0.1
120120
with:
121121
persist-credentials: false
122122

@@ -142,7 +142,7 @@ jobs:
142142
runs-on: ubuntu-latest
143143
steps:
144144
- name: Checkout
145-
uses: actions/checkout@v5.0.0
145+
uses: actions/checkout@v6.0.1
146146
with:
147147
persist-credentials: false
148148

@@ -172,11 +172,11 @@ jobs:
172172
runs-on: ubuntu-latest
173173
steps:
174174
- name: Checkout
175-
uses: actions/checkout@v5.0.0
175+
uses: actions/checkout@v6.0.1
176176
with:
177177
persist-credentials: false
178178

179-
- uses: actions/setup-node@v6.0.0
179+
- uses: actions/setup-node@v6.1.0
180180
with:
181181
node-version-file: '.node-version'
182182

@@ -220,7 +220,7 @@ jobs:
220220
runs-on: ubuntu-latest
221221
steps:
222222
- name: Checkout
223-
uses: actions/checkout@v5.0.0
223+
uses: actions/checkout@v6.0.1
224224
with:
225225
persist-credentials: false
226226

@@ -240,7 +240,7 @@ jobs:
240240
runs-on: ubuntu-latest
241241
steps:
242242
- name: Checkout
243-
uses: actions/checkout@v5.0.0
243+
uses: actions/checkout@v6.0.1
244244
with:
245245
persist-credentials: false
246246

@@ -280,7 +280,7 @@ jobs:
280280
runs-on: ubuntu-latest
281281
steps:
282282
- name: Checkout
283-
uses: actions/checkout@v5.0.0
283+
uses: actions/checkout@v6.0.1
284284

285285
- name: Create random file
286286
run: echo $RANDOM > integration/1
@@ -302,7 +302,7 @@ jobs:
302302
runs-on: ubuntu-latest
303303
steps:
304304
- name: Checkout
305-
uses: actions/checkout@v5.0.0
305+
uses: actions/checkout@v6.0.1
306306

307307
- name: Create random file
308308
run: echo $RANDOM > integration/2
@@ -336,7 +336,7 @@ jobs:
336336
runs-on: ubuntu-latest
337337
steps:
338338
- name: Checkout
339-
uses: actions/checkout@v5.0.0
339+
uses: actions/checkout@v6.0.1
340340
with:
341341
persist-credentials: false
342342

.github/workflows/label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
if: github.event.pull_request.merged == false
1616
steps:
1717
- name: Checkout 🛎️
18-
uses: actions/checkout@v5.0.0
18+
uses: actions/checkout@v6.0.1
1919

2020
- name: Assign Labels 🏷️
2121
id: action-assign-labels

.github/workflows/production.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v5.0.0
16+
uses: actions/checkout@v6.0.1
1717

18-
- uses: actions/setup-node@v6.0.0
18+
- uses: actions/setup-node@v6.1.0
1919
with:
2020
node-version-file: '.node-version'
2121
registry-url: 'https://registry.npmjs.org'

.github/workflows/sponsors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout 🛎️
12-
uses: actions/checkout@v5.0.0
12+
uses: actions/checkout@v6.0.1
1313

1414
- name: Generate Sponsors 💖
1515
uses: JamesIves/github-sponsors-readme-action@v1

.github/workflows/version.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
name: Publish to Registries 📦
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v5.0.0
26+
- uses: actions/checkout@v6.0.1
2727
with:
2828
ref: dev
2929

3030
# Setup .npmrc file to publish to npm
31-
- uses: actions/setup-node@v6.0.0
31+
- uses: actions/setup-node@v6.1.0
3232
with:
3333
node-version-file: '.node-version'
3434
registry-url: 'https://registry.npmjs.org'
@@ -59,7 +59,7 @@ jobs:
5959
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6060

6161
# Setup .npmrc file to publish to GitHub Packages
62-
- uses: actions/setup-node@v6.0.0
62+
- uses: actions/setup-node@v6.1.0
6363
with:
6464
node-version-file: '.node-version'
6565
registry-url: 'https://npm.pkg.github.com'

__tests__/git.test.ts

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('git', () => {
5454
})
5555

5656
await init(action)
57-
expect(execute).toHaveBeenCalledTimes(7)
57+
expect(execute).toHaveBeenCalledTimes(8)
5858
})
5959

6060
it('should catch when a function throws an error', async () => {
@@ -101,7 +101,7 @@ describe('git', () => {
101101
})
102102

103103
await init(action)
104-
expect(execute).toHaveBeenCalledTimes(7)
104+
expect(execute).toHaveBeenCalledTimes(8)
105105
})
106106

107107
it('should not unset git config if a user is using ssh', async () => {
@@ -144,7 +144,54 @@ describe('git', () => {
144144
})
145145

146146
await init(action)
147-
expect(execute).toHaveBeenCalledTimes(7)
147+
expect(execute).toHaveBeenCalledTimes(8)
148+
})
149+
150+
it('should remove includeIf git config sections when present', async () => {
151+
// Mock execute to return includeIf config entries
152+
;(execute as jest.Mock)
153+
.mockImplementationOnce(() => {
154+
// First call: git config safe.directory
155+
return {stdout: '', stderr: ''}
156+
})
157+
.mockImplementationOnce(() => ({stdout: '', stderr: ''})) // user.name
158+
.mockImplementationOnce(() => ({stdout: '', stderr: ''})) // user.email
159+
.mockImplementationOnce(() => ({stdout: '', stderr: ''})) // core.ignorecase
160+
.mockImplementationOnce(() => ({stdout: '', stderr: ''})) // unset extraheader
161+
.mockImplementationOnce(() => {
162+
// git config --get-regexp includeIf - simulate checkout@v6 style config
163+
return {
164+
stdout:
165+
'includeIf.gitdir:/home/runner/work/repo/.git.path /home/runner/work/_temp/git-credentials-123.config\n',
166+
stderr: ''
167+
}
168+
})
169+
.mockImplementationOnce(() => ({stdout: '', stderr: ''})) // remove-section includeIf
170+
.mockImplementationOnce(() => ({stdout: '', stderr: ''})) // git remote rm
171+
.mockImplementationOnce(() => ({stdout: '', stderr: ''})) // git remote add
172+
173+
Object.assign(action, {
174+
hostname: 'github.com',
175+
silent: false,
176+
repositoryPath: 'JamesIves/github-pages-deploy-action',
177+
token: '123',
178+
branch: 'branch',
179+
folder: '.',
180+
pusher: {
181+
name: 'asd',
182+
email: 'as@cat'
183+
},
184+
isTest: TestFlag.HAS_CHANGED_FILES
185+
})
186+
187+
await init(action)
188+
189+
// Verify that git config --remove-section was called for includeIf
190+
expect(execute).toHaveBeenCalledWith(
191+
expect.stringContaining('git config --local --remove-section'),
192+
action.workspace,
193+
true
194+
)
148195
})
149196
})
150197

__tests__/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('main', () => {
5353
debug: true
5454
})
5555
await run(action)
56-
expect(execute).toHaveBeenCalledTimes(19)
56+
expect(execute).toHaveBeenCalledTimes(20)
5757
expect(rmRF).toHaveBeenCalledTimes(1)
5858
expect(exportVariable).toHaveBeenCalledTimes(1)
5959
})
@@ -73,7 +73,7 @@ describe('main', () => {
7373
isTest: TestFlag.HAS_CHANGED_FILES
7474
})
7575
await run(action)
76-
expect(execute).toHaveBeenCalledTimes(22)
76+
expect(execute).toHaveBeenCalledTimes(23)
7777
expect(rmRF).toHaveBeenCalledTimes(1)
7878
expect(exportVariable).toHaveBeenCalledTimes(1)
7979
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@jamesives/github-pages-deploy-action",
33
"description": "GitHub action for building a project and deploying it to GitHub pages.",
44
"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)",
5-
"version": "4.7.3",
5+
"version": "4.7.4",
66
"license": "MIT",
77
"main": "lib/lib.js",
88
"types": "lib/lib.d.ts",

0 commit comments

Comments
 (0)