Skip to content

Commit 0f08947

Browse files
authored
Merge branch 'KelvinTegelaar:master' into master
2 parents 2440943 + d019386 commit 0f08947

1,017 files changed

Lines changed: 108485 additions & 25629 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
local.settings.json

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ insert_final_newline = true
88

99
[*.{ps1, psd1, psm1}]
1010
indent_size = 4
11-
end_of_line = crlf
11+
end_of_line = lf
1212
trim_trailing_whitespace = true
1313

1414
[*.json]
1515
indent_size = 2
16-
end_of_line = crlf
16+
end_of_line = lf
1717
trim_trailing_whitespace = true
1818

1919
[*.{md, txt}]

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
* text=lf
2+
3+
*.txt text eol=crlf
4+
*.md text eol=crlf
5+
6+
*.ps1 text eol=lf
7+
*.psd1 text eol=lf
8+
*.psm1 text eol=lf
9+
10+
*.json text eol=lf
11+
12+
*.png binary
13+
*.jpg binary
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: PR Branch Check
2+
3+
on:
4+
# Using pull_request_target instead of pull_request for secure handling of fork PRs
5+
pull_request_target:
6+
# Only run on these PR events
7+
types: [opened, synchronize, reopened]
8+
# Only check PRs targeting these branches
9+
branches:
10+
- main
11+
- master
12+
13+
permissions:
14+
pull-requests: write
15+
issues: write
16+
17+
jobs:
18+
check-branch:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check and Comment on PR
22+
# Only process fork PRs with specific branch conditions
23+
# Must be a fork AND (source is main/master OR target is main/master)
24+
if: |
25+
github.event.pull_request.head.repo.fork == true &&
26+
((github.event.pull_request.head.ref == 'main' || github.event.pull_request.head.ref == 'master') ||
27+
(github.event.pull_request.base.ref == 'main' || github.event.pull_request.base.ref == 'master'))
28+
uses: actions/github-script@v7
29+
with:
30+
github-token: ${{ secrets.GITHUB_TOKEN }}
31+
script: |
32+
let message = '';
33+
34+
message += '🔄 If you are attempting to update your CIPP repo please follow the instructions at: https://docs.cipp.app/setup/self-hosting-guide/updating ';
35+
message += '\n\n';
36+
37+
// Check if PR is targeting main/master
38+
if (context.payload.pull_request.base.ref === 'main' || context.payload.pull_request.base.ref === 'master') {
39+
message += '⚠️ PRs cannot target the main branch directly. If you are attempting to contribute code please PR to the dev branch.\n\n';
40+
}
41+
42+
// Check if PR is from a fork's main/master branch
43+
if (context.payload.pull_request.head.repo.fork &&
44+
(context.payload.pull_request.head.ref === 'main' || context.payload.pull_request.head.ref === 'master')) {
45+
message += '⚠️ This PR cannot be merged because it originates from your fork\'s main/master branch. If you are attempting to contribute code please PR from your dev branch or another non-main/master branch.\n\n';
46+
}
47+
48+
message += '🔒 This PR will now be automatically closed due to the above violation(s).';
49+
50+
// Post the comment
51+
await github.rest.issues.createComment({
52+
...context.repo,
53+
issue_number: context.issue.number,
54+
body: message
55+
});
56+
57+
// Close the PR
58+
await github.rest.pulls.update({
59+
...context.repo,
60+
pull_number: context.issue.number,
61+
state: 'closed'
62+
});
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1-
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
2-
# More GitHub Actions for Azure: https://github.com/Azure/actions
3-
4-
name: Build and deploy Powershell project to Azure Function App - cippkkxvm
5-
6-
on:
7-
push:
8-
branches:
9-
- dev
10-
workflow_dispatch:
11-
12-
env:
13-
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
14-
15-
jobs:
16-
deploy:
17-
runs-on: windows-latest
18-
19-
steps:
20-
- name: 'Checkout GitHub Action'
21-
uses: actions/checkout@v4
22-
23-
- name: 'Run Azure Functions Action'
24-
uses: Azure/functions-action@v1
25-
id: fa
26-
with:
27-
app-name: 'cippkkxvm'
28-
slot-name: 'Production'
29-
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
30-
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_171C3E2B1E2346AAA333905DFCA62F2D }}
1+
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
2+
# More GitHub Actions for Azure: https://github.com/Azure/actions
3+
4+
name: dev_api
5+
6+
on:
7+
push:
8+
branches:
9+
- dev
10+
workflow_dispatch:
11+
12+
env:
13+
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
14+
15+
jobs:
16+
deploy:
17+
if: github.event.repository.fork == false && github.event_name == 'push'
18+
runs-on: windows-latest
19+
20+
steps:
21+
- name: 'Checkout GitHub Action'
22+
uses: actions/checkout@v4
23+
24+
- name: 'Run Azure Functions Action'
25+
uses: Azure/functions-action@v1
26+
id: fa
27+
with:
28+
app-name: 'cippjta72'
29+
slot-name: 'Production'
30+
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
31+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_5B44448119C645C099EE192346D7433A }}
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1-
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
2-
# More GitHub Actions for Azure: https://github.com/Azure/actions
3-
4-
name: Build and deploy Powershell project to Azure Function App - cipplwwww
5-
6-
on:
7-
push:
8-
branches:
9-
- dev
10-
workflow_dispatch:
11-
12-
env:
13-
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
14-
15-
jobs:
16-
deploy:
17-
runs-on: windows-latest
18-
19-
steps:
20-
- name: 'Checkout GitHub Action'
21-
uses: actions/checkout@v4
22-
23-
- name: 'Run Azure Functions Action'
24-
uses: Azure/functions-action@v1
25-
id: fa
26-
with:
27-
app-name: 'cipplwwww'
28-
slot-name: 'Production'
29-
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
30-
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_00A9A6DFE9244C2EA8952190FFF10F45 }}
1+
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
2+
# More GitHub Actions for Azure: https://github.com/Azure/actions
3+
4+
name: dev_api_proc
5+
6+
on:
7+
push:
8+
branches:
9+
- dev
10+
workflow_dispatch:
11+
12+
env:
13+
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
14+
15+
jobs:
16+
deploy:
17+
if: github.event.repository.fork == false && github.event_name == 'push'
18+
runs-on: windows-latest
19+
20+
steps:
21+
- name: 'Checkout GitHub Action'
22+
uses: actions/checkout@v4
23+
24+
- name: 'Run Azure Functions Action'
25+
uses: Azure/functions-action@v1
26+
id: fa
27+
with:
28+
app-name: 'cippjta72-proc'
29+
slot-name: 'Production'
30+
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
31+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_A53AC5C52A55459DA0A3D8F1716638CB }}

.github/workflows/dev_cippkwn4s-auditlog.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/dev_cippkwn4s.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/dev_cipplwwww-proc.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
22
# More GitHub Actions for Azure: https://github.com/Azure/actions
33

4-
name: Build and deploy Powershell project to Azure Function App - cipp4i6t3
4+
name: Build and deploy Powershell project to Azure Function App - cipppwrro
55

66
on:
77
push:
@@ -24,7 +24,7 @@ jobs:
2424
uses: Azure/functions-action@v1
2525
id: fa
2626
with:
27-
app-name: 'cipp4i6t3'
27+
app-name: 'cipppwrro'
2828
slot-name: 'Production'
2929
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
30-
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_9D257A31ACA24925A112AF5FFC2BEAFE }}
30+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D5D7DFF930C04B519206F25DDCD88324 }}

0 commit comments

Comments
 (0)