-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev/v14' into snyk-upgrade-2cc096e795281d7fa92c474b42f4…
…0842
- Loading branch information
Showing
1 changed file
with
13 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name: 🔃 Create PRs | ||
name: 📤 Create PRs | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dry-run: | ||
description: 'Run the workflow without creating PRs' | ||
description: "Dry run: Run the workflow without creating a Pull Request" | ||
required: false | ||
default: false | ||
type: boolean | ||
|
@@ -36,12 +36,10 @@ jobs: | |
matrix: | ||
branch: ${{fromJson(needs.get-branches.outputs.branches)}} | ||
runs-on: ubuntu-latest | ||
env: | ||
DRY_RUN: ${{ contains(github.event.inputs.dry-run, 'true') }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set Env | ||
- name: Set Variables | ||
run: | | ||
TARGET=$(echo ${{ matrix.branch }} | sed 's/dev\///') | ||
SOURCE=${{ matrix.branch }} | ||
|
@@ -56,22 +54,16 @@ jobs: | |
exit 1 | ||
fi | ||
if [ "$SOURCE" == "$TARGET" ]; then | ||
echo "SOURCE is the same as TARGET" | ||
exit 1 | ||
fi | ||
echo "SOURCE=$SOURCE" | ||
echo "TARGET=$TARGET" | ||
echo "SOURCE=$SOURCE" >> $GITHUB_ENV | ||
echo "TARGET=$TARGET" >> $GITHUB_ENV | ||
- name: Run the Action | ||
if: ${{ github.event.inputs.dry-run == 'false' }} || ${{ github.event_name == 'schedule' }} | ||
uses: devops-infra/[email protected] | ||
- name: Create Pull Request | ||
id: create-pull-request | ||
uses: jcdcdev/jcdcdev.GitHub.CreatePullRequest@main | ||
with: | ||
github_token: ${{ secrets.JCDC_BOT_TOKEN}} | ||
source_branch: ${{ env.SOURCE }} | ||
target_branch: ${{ env.TARGET }} | ||
title: "Merge ${{ env.SOURCE }} into ${{ env.TARGET }}" | ||
reviewer: ${{ github.repository_owner }} | ||
assignee: ${{ github.repository_owner }} | ||
source-branch: ${{ env.SOURCE }} | ||
target-branch: ${{ env.TARGET }} | ||
dry-run: ${{ env.DRY_RUN }} | ||
github-token: ${{ secrets.JCDC_BOT_TOKEN }} |