@@ -19,36 +19,38 @@ jobs:
1919 create_pr :
2020 runs-on : ubuntu-latest
2121 steps :
22-
22+ - id : Set-GitHub-org
23+ run : echo "GITHUB_ORG=${GITHUB_REPOSITORY%%/*}" >> $GITHUB_ENV
24+
2325 - name : Checkout from_branch branch
2426 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2527 with :
2628 ref : ${{ github.event.inputs.from_branch }}
27-
29+
2830 - name : Create release branch
2931 if : ${{ !startsWith(github.event.inputs.from_branch, 'release/') }}
3032 run : |
3133 echo "NEW_BRANCH=release/${{ github.event.inputs.release_number }}" >> $GITHUB_ENV
32-
34+
3335 - name : Use existing release branch
3436 if : startsWith(github.event.inputs.from_branch, 'release/')
3537 run : |
3638 echo "NEW_BRANCH=${{ github.event.inputs.from_branch }}" >> $GITHUB_ENV
37-
39+
3840 - name : Configure git
3941 run : |
4042 git config --global user.name "${{ env.GIT_USERNAME }}"
4143 git config --global user.email "${{ env.GIT_EMAIL }}"
42-
44+
4345 - name : Push branch
4446 if : " !startsWith('${{ github.event.inputs.from_branch }}', 'release/')"
4547 run : git push origin HEAD:${NEW_BRANCH}
46-
48+
4749 - name : Checkout release branch
4850 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4951 with :
5052 ref : ${{ env.NEW_BRANCH }}
51-
53+
5254 - name : Update version numbers in key files
5355 run : |
5456 sed -ri 's/__version__ = ".*"/__version__ = "${{ github.event.inputs.release_number }}"/' dojo/__init__.py
@@ -82,18 +84,14 @@ jobs:
8284 commit_author : " ${{ env.GIT_USERNAME }} <${{ env.GIT_EMAIL }}>"
8385 commit_message : " Update versions in application files"
8486 branch : ${{ env.NEW_BRANCH }}
85- - id : set-repo-org
86- run : echo "repoorg=${GITHUB_REPOSITORY%%/*}" >> $GITHUB_ENV
87-
87+
8888 - name : Create Pull Request
89- env :
90- REPO_ORG : ${{ env.repoorg }}
9189 uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
9290 with :
9391 github-token : ${{ secrets.GITHUB_TOKEN }}
9492 script : |
9593 github.rest.pulls.create({
96- owner: '${{ env.REPO_ORG }}',
94+ owner: '${{ env.GITHUB_ORG }}',
9795 repo: 'django-DefectDojo',
9896 title: 'Release: Merge release into master from: ${{ env.NEW_BRANCH }}',
9997 body: `Release triggered by \`${ process.env.GITHUB_ACTOR }\``,
0 commit comments