Skip to content

fix: GitHub action write protected branch #227

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 3 commits into from
Oct 2, 2023
Merged
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
44 changes: 26 additions & 18 deletions .github/workflows/pr_merge.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build PR Merge
on:
pull_request:
types: [closed]
types: [ closed ]

env:
ARTIFACT_BASE_NAME: cumulus_lambda_functions
Expand All @@ -13,20 +13,28 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- run: |
# make file runnable, might not be necessary
chmod +x "${GITHUB_WORKSPACE}/ci.cd/store_version.sh"
echo "what the ..."
"${GITHUB_WORKSPACE}/ci.cd/store_version.sh"
- run: |
artifact_file_name="${{ env.ARTIFACT_BASE_NAME }}-${{ env.software_version }}.zip"
echo "${PR_TITLE} -- ${PR_NUMBER}"
- run: |
python3 "${GITHUB_WORKSPACE}/ci.cd/update_setup_version.py" install
- run: |
chmod +x "${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
"${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- run: |
# make file runnable, might not be necessary
chmod +x "${GITHUB_WORKSPACE}/ci.cd/store_version.sh"
echo "what the ..."
"${GITHUB_WORKSPACE}/ci.cd/store_version.sh"
- run: |
artifact_file_name="${{ env.ARTIFACT_BASE_NAME }}-${{ env.software_version }}.zip"
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@latest
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"