@@ -46,17 +46,34 @@ jobs:
4646 git branch ${{ env.FEATURE_BRANCH_NAME }}
4747 git checkout ${{ env.FEATURE_BRANCH_NAME }}
4848 echo "DUMMY" >> new-file.txt
49+ git commit -m "chore: Update NGINX Module reference from detected changes in nginx/nginx.org repo"
50+ git push origin ${{ env.FEATURE_BRANCH_NAME }}
4951
5052 create-PR :
5153 name : Create PR in documentation repository
5254 runs-on : ubuntu-latest
5355 steps :
54- - name : Checkout Repository
55- uses : actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 # v4.2.2
56- with :
57- fetch-depth : 0
5856 - name : Generate the PR
59- run : |
60- gh pr create -B main -H ${{ env.FEATURE_BRANCH_NAME }} --title 'Merge branch_to_merge into base_branch' --body 'Created by Github action'
61- env :
62- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
57+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
58+ with :
59+ script : |
60+ const { repo, owner } = context.repo;
61+
62+ const result = await github.rest.pulls.create({
63+ title: 'NGINX Plus - Module Ref: Update content for content/nginx due to detected changes',
64+ owner,
65+ repo,
66+ head: '${{ env.FEATURE_BRANCH_NAME }}',
67+ base: 'main',
68+ body: [
69+ '### Proposed Changes',
70+ 'Updated NGINX Plus docs',
71+ ].join('\n')
72+ });
73+
74+ github.rest.issues.addLabels({
75+ owner,
76+ repo,
77+ issue_number: result.data.number,
78+ labels: ['product/nginx-plus', 'dependencies', 'module-reference']
79+ });
0 commit comments