Skip to content

Commit

Permalink
Merge branch 'dev/v14' into snyk-upgrade-2cc096e795281d7fa92c474b42f4…
Browse files Browse the repository at this point in the history
…0842
  • Loading branch information
jcdcdev authored Sep 26, 2024
2 parents 14cda0d + 57e7349 commit 4058fc4
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions .github/workflows/create-pr.yml
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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}

0 comments on commit 4058fc4

Please sign in to comment.