Skip to content

Commit b261e91

Browse files
authored
Merge branch 'dev/v14' into dependabot/nuget/src/TestSite.14/nuget-fefd2cbd46
2 parents f4f5f59 + 1952287 commit b261e91

File tree

6 files changed

+2585
-34
lines changed

6 files changed

+2585
-34
lines changed

.github/dependabot.yml

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

.github/workflows/auto-assign.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 🤖 Auto Assign
2+
on:
3+
issues:
4+
types: [opened, edited, labeled, unlabeled]
5+
pull_request:
6+
types: [opened, edited, labeled, unlabeled]
7+
jobs:
8+
run:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: wow-actions/auto-assign@v3
12+
with:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
reviewers: |
15+
${{ github.repository_owner }}
16+
assignees: |
17+
${{ github.repository_owner }}

.github/workflows/build.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
name: 🏗️ Build
22
on:
33
pull_request:
4-
branches: "*"
54
workflow_dispatch:
65
jobs:
7-
metadata:
8-
uses: jcdcdev/jcdcdev.Github.UmbracoSimpleDeploy/.github/workflows/generate-project-metadata.yml@main
96
build:
107
runs-on: ubuntu-latest
11-
needs:
12-
- metadata
138
steps:
149
- name: Build
1510
uses: jcdcdev/jcdcdev.Umbraco.Github.Build@main
1611
with:
17-
project-name: ${{ needs.metadata.outputs.project-name}}
18-
project-path: ${{ needs.metadata.outputs.project-path }}
12+
project-name: Umbraco.Community.DataProtection
13+
project-path: src/Umbraco.Community.DataProtection/Umbraco.Community.DataProtection.csproj
1914
umbraco-version: 14

.github/workflows/create-pr.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: 🔃 Create PRs
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
dry-run:
6+
description: 'Run the workflow without creating PRs'
7+
required: false
8+
default: false
9+
type: boolean
10+
schedule:
11+
- cron: '0 2 * * *'
12+
jobs:
13+
get-branches:
14+
outputs:
15+
branches: ${{ steps.get-branches.outputs.branches }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Get branches
23+
id: get-branches
24+
shell: pwsh
25+
run: |
26+
$branches = git branch -r --format="%(refname:short)" | ForEach-Object { $_.Trim() -replace "^origin/", "" }
27+
# filter only branches that start with dev/
28+
$branches = $branches | Where-Object { $_ -match "^dev/" }
29+
$branchJson = ConvertTo-Json @($branches) -Compress
30+
Write-Host "branches=$branchJson"
31+
echo "branches=$branchJson" >> $env:GITHUB_OUTPUT
32+
create-pr:
33+
needs: get-branches
34+
strategy:
35+
max-parallel: 1
36+
matrix:
37+
branch: ${{fromJson(needs.get-branches.outputs.branches)}}
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
- name: Set Env
45+
run: |
46+
TARGET=$(echo ${{ matrix.branch }} | sed 's/dev\///')
47+
SOURCE=${{ matrix.branch }}
48+
49+
if [ -z "$TARGET" ]; then
50+
echo "TARGET is empty"
51+
exit 1
52+
fi
53+
54+
if [ -z "$SOURCE" ]; then
55+
echo "SOURCE is empty"
56+
exit 1
57+
fi
58+
59+
if [ "$SOURCE" == "$TARGET" ]; then
60+
echo "SOURCE is the same as TARGET"
61+
exit 1
62+
fi
63+
64+
echo "SOURCE=$SOURCE"
65+
echo "TARGET=$TARGET"
66+
echo "SOURCE=$SOURCE" >> $GITHUB_ENV
67+
echo "TARGET=$TARGET" >> $GITHUB_ENV
68+
- name: Run the Action
69+
if: ${{ github.event.inputs.dry-run == 'false' }} || ${{ github.event_name == 'schedule' }}
70+
uses: devops-infra/[email protected]
71+
with:
72+
github_token: ${{ secrets.JCDC_BOT_TOKEN}}
73+
source_branch: ${{ env.SOURCE }}
74+
target_branch: ${{ env.TARGET }}
75+
title: "Merge ${{ env.SOURCE }} into ${{ env.TARGET }}"
76+
reviewer: ${{ github.repository_owner }}
77+
assignee: ${{ github.repository_owner }}

.github/workflows/release.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,18 @@ on:
44
pull_request:
55
types: [ closed ]
66
jobs:
7-
metadata:
8-
uses: jcdcdev/jcdcdev.Github.UmbracoSimpleDeploy/.github/workflows/generate-project-metadata.yml@main
97
release:
8+
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
109
runs-on: ubuntu-latest
1110
permissions:
1211
contents: write
13-
needs:
14-
- metadata
1512
steps:
1613
- name: Build
1714
id: build
1815
uses: jcdcdev/jcdcdev.Umbraco.GitHub.Build@main
1916
with:
20-
project-name: ${{ needs.metadata.outputs.project-name}}
21-
project-path: ${{ needs.metadata.outputs.project-path }}
17+
project-name: Umbraco.Community.DataProtection
18+
project-path: src/Umbraco.Community.DataProtection/Umbraco.Community.DataProtection.csproj
2219
umbraco-version: 14
2320
- name: Release
2421
uses: jcdcdev/jcdcdev.Umbraco.GitHub.Release@main

0 commit comments

Comments
 (0)