Skip to content

Commit 191f4df

Browse files
committed
+changelog-ignore: update create-pr.yml
1 parent 194c543 commit 191f4df

File tree

1 file changed

+13
-21
lines changed

1 file changed

+13
-21
lines changed

.github/workflows/create-pr.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: 🔃 Create PRs
1+
name: 📤 Create PRs
22
on:
33
workflow_dispatch:
44
inputs:
55
dry-run:
6-
description: 'Run the workflow without creating PRs'
6+
description: "Dry run: Run the workflow without creating a Pull Request"
77
required: false
88
default: false
99
type: boolean
@@ -36,12 +36,10 @@ jobs:
3636
matrix:
3737
branch: ${{fromJson(needs.get-branches.outputs.branches)}}
3838
runs-on: ubuntu-latest
39+
env:
40+
DRY_RUN: ${{ contains(github.event.inputs.dry-run, 'true') }}
3941
steps:
40-
- name: Checkout code
41-
uses: actions/checkout@v4
42-
with:
43-
fetch-depth: 0
44-
- name: Set Env
42+
- name: Set Variables
4543
run: |
4644
TARGET=$(echo ${{ matrix.branch }} | sed 's/dev\///')
4745
SOURCE=${{ matrix.branch }}
@@ -56,22 +54,16 @@ jobs:
5654
exit 1
5755
fi
5856
59-
if [ "$SOURCE" == "$TARGET" ]; then
60-
echo "SOURCE is the same as TARGET"
61-
exit 1
62-
fi
63-
6457
echo "SOURCE=$SOURCE"
6558
echo "TARGET=$TARGET"
59+
6660
echo "SOURCE=$SOURCE" >> $GITHUB_ENV
6761
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]
62+
- name: Create Pull Request
63+
id: create-pull-request
64+
uses: jcdcdev/jcdcdev.GitHub.CreatePullRequest@main
7165
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 }}
66+
source-branch: ${{ env.SOURCE }}
67+
target-branch: ${{ env.TARGET }}
68+
dry-run: ${{ env.DRY_RUN }}
69+
github-token: ${{ secrets.JCDC_BOT_TOKEN }}

0 commit comments

Comments
 (0)