Skip to content

Commit 0f89009

Browse files
authored
fix: GitHub action write protected branch 3 (#229)
* chore: dummy commit * fix: protected-branch error * fix: wrong version * fix: using pat token + shell script
1 parent d515835 commit 0f89009

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

.github/workflows/pr_merge.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ env:
77
ARTIFACT_BASE_NAME: cumulus_lambda_functions
88
PR_NUMBER: ${{ github.event.number }}
99
PR_TITLE: ${{ github.event.pull_request.title }}
10+
PAT_TOKEN: ${{ secrets.PAT_SECRET }}
1011
jobs:
1112
if_merged:
1213
if: github.event.pull_request.merged == true
@@ -27,14 +28,6 @@ jobs:
2728
echo "${PR_TITLE} -- ${PR_NUMBER}"
2829
- run: |
2930
python3 "${GITHUB_WORKSPACE}/ci.cd/update_setup_version.py" install
30-
- name: Push files and tag
31-
uses: Amraneze/push-to-protected-branch@v1.5.0
32-
with:
33-
repository: ${{ github.repository }}
34-
branch_name: ${{ github.ref_name }}
35-
github_token: ${{ secrets.PAT_SECRET }}
36-
commit_message: 'chore: update version + change log'
37-
files_to_commit: 'setup.py,CHANGELOG.md'
38-
# - run: |
39-
# chmod +x "${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
40-
# "${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
31+
- run: |
32+
chmod +x "${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
33+
"${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"

ci.cd/update_version_commit.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ git status
33
git diff
44
current_branch=`git branch --show-current`
55
git add -u
6-
git config --local user.email "github-actions[bot]@users.noreply.github.com"
7-
git config --local user.name "github-actions[bot]"
6+
git config --local user.email "wai.phyo@jpl.nasa.gov"
7+
git config --local user.name "wphyojpl"
88
git commit -m 'chore: update version + change log'
9-
git push origin $current_branch
9+
git push origin $current_branch

0 commit comments

Comments
 (0)