diff --git a/.github/workflows/add_tagged_docs.yml b/.github/workflows/add_tagged_docs.yml index 4a982db..89d9922 100644 --- a/.github/workflows/add_tagged_docs.yml +++ b/.github/workflows/add_tagged_docs.yml @@ -69,16 +69,21 @@ jobs: git commit -m "Add documentation for $VERSION_TAG" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Merge new branch into main branch, eyeball status - run: | - git pull origin main - git checkout main - git merge $BRANCH_NAME --no-commit - git status - - name: Add and commit all changes to the main branch and push + - name: Create pull request run: | - git add . - git commit -m "Merge $BRANCH_NAME into main" - git push origin main + PR_TITLE="Merge $BRANCH_NAME into main" + PR_BODY="Automated pull request from GitHub Actions workflow" + RESPONSE=$(curl -X POST \ + -H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/leehart/tmp_test_6/pulls \ + -d '{ + "title": "'"$PR_TITLE"'", + "body": "'"$PR_BODY"'", + "head": "'"$BRANCH_NAME"'", + "base": "main" + }') + echo "$RESPONSE" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file