File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1313 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
1414 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
1515 STAGE : dev
16+ GH_TOKEN : ${{ github.token }}
1617 steps :
1718 - uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
1821 - name : Use Node.js
1922 uses : actions/setup-node@v4
2023 with :
3740 run : npm run deploy-dev-stage
3841 - name : Stage Info
3942 run : |
40- export STAGE_INFO=$(npx serverless info --stage dev --region us-east-2) >> $GITHUB_ENV
41- - name : Create Pull Request to Main
42- uses : peter-evans/create-pull-request@v5
43- with :
44- token : ${{ secrets.GITHUB_TOKEN }}
45- commit-message : " Automated PR from Dev to Main"
46- author : ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
47- title : " Dev Staged"
48- body : " This is an automated pull request to merge changes from the Dev branch into Main. $STAGE_INFO"
49- branch : " main"
43+ echo 'STAGE_INFO=$(npx serverless info --stage dev --region us-east-2)' >> $GITHUB_ENV
44+ - name : Create Pull Request
45+ run : |
46+ PR_BRANCH=$(git branch --show-current)
47+ DEFAULT_BRANCH=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
48+ gh pr create --title "Automated Pull Request from $PR_BRANCH" --body "Dev Stage Relased:$STAGE_INFO" --base $DEFAULT_BRANCH --head $PR_BRANCH --repo $GITHUB_REPOSITORY
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const { SSMClient,
55const AWS_REGION = 'us-east-2'
66const STAGE = process . env . STAGE || 'prod'
77
8+ console . log ( 'test' )
89async function getDatabaseUrl ( ) {
910 const DATABASE_URL_SSM_PARAM = `/serverless-nodejs-api/${ STAGE } /database-url`
1011 const client = new SSMClient ( { region : AWS_REGION } )
You can’t perform that action at this time.
0 commit comments