Skip to content

fix: GitHub action write protected branch 3 #229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .github/workflows/pr_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ env:
ARTIFACT_BASE_NAME: cumulus_lambda_functions
PR_NUMBER: ${{ github.event.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
PAT_TOKEN: ${{ secrets.PAT_SECRET }}
jobs:
if_merged:
if: github.event.pull_request.merged == true
Expand All @@ -27,14 +28,6 @@ jobs:
echo "${PR_TITLE} -- ${PR_NUMBER}"
- run: |
python3 "${GITHUB_WORKSPACE}/ci.cd/update_setup_version.py" install
- name: Push files and tag
uses: Amraneze/push-to-protected-branch@v1.5.0
with:
repository: ${{ github.repository }}
branch_name: ${{ github.ref_name }}
github_token: ${{ secrets.PAT_SECRET }}
commit_message: 'chore: update version + change log'
files_to_commit: 'setup.py,CHANGELOG.md'
# - run: |
# chmod +x "${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
# "${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
- run: |
chmod +x "${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
"${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
6 changes: 3 additions & 3 deletions ci.cd/update_version_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ git status
git diff
current_branch=`git branch --show-current`
git add -u
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git config --local user.email "wai.phyo@jpl.nasa.gov"
git config --local user.name "wphyojpl"
git commit -m 'chore: update version + change log'
git push origin $current_branch
git push origin $current_branch