Skip to content

Commit c604e14

Browse files
Sai Medhini Reddy MaryadaSai Medhini Reddy Maryada
Sai Medhini Reddy Maryada
authored and
Sai Medhini Reddy Maryada
committed
updated
Signed-off-by: Sai Medhini Reddy Maryada <saimedhinireddymaryada@Sais-MacBook-Pro.local>
1 parent 7447a4c commit c604e14

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

.github/workflows/update_file.yml

+7-16
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,11 @@ jobs:
4747
base: main
4848
committer: opensearchpy-api-update-bot <noreply@github.com>
4949
author: opensearchpy-api-update-bot <noreply@github.com>
50-
- name: printed
50+
- name: Check out update branch
51+
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
5152
run: |
52-
echo "Checking find pattern in CHANGELOG.md..."
53-
grep -n "Your contribution here." CHANGELOG.md || echo "Pattern not found."
54-
- name: Checkout PR
55-
env:
56-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57-
run: gh pr checkout ${{ steps.cpr.outputs.pull-request-number }}
53+
git fetch origin automated-api-update
54+
git checkout automated-api-update
5855
- name: Update CHANGELOG
5956
uses: jacobtomlinson/gha-find-replace@v3
6057
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
@@ -65,22 +62,16 @@ jobs:
6562
include: "**CHANGELOG.md"
6663
- name: Commit and Push
6764
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
68-
env:
69-
token: ${{ secrets.GITHUB_TOKEN }}
7065
run: |
7166
git config --local user.name 'opensearchpy-api-update-bot'
7267
git config --local user.email 'noreply@github.com'
7368
git config --local --unset-all http.https://github.com/.extraheader || true
7469
AUTH=$(echo -n "x-access-token:${{ steps.github_app_token.outputs.token || secrets.GITHUB_TOKEN }}" | base64)
7570
echo "::add-mask::${AUTH}"
7671
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ${AUTH}"
77-
add_output=$(git add CHANGELOG.md)
78-
commit_output=$(git commit --amend --no-edit)
79-
cat CHANGELOG.md
80-
PUSH_OUTPUT=$(gh pr merge ${{ steps.cpr.outputs.pull-request-number }} --squash --merge --auto)
81-
echo "Git Add Output: $add_output"
82-
echo "Git Commit Output: $commit_output"
83-
echo "PUSHED_OUTPUT: $PUSH_OUTPUT"
72+
git add CHANGELOG.md
73+
git commit --amend --no-edit
74+
git push origin automated-api-update -f
8475
- name: List modified files for automated-api-update branch
8576
run: |
8677
branch_commit=$(git rev-parse automated-api-update)

0 commit comments

Comments
 (0)