Skip to content

Commit

Permalink
fix: add CODEOWNERS file that is required for python requirements GHA (
Browse files Browse the repository at this point in the history
…#17)

* fix: add CODEOWNERS file that is required for python requirements GHA

* fix: update GHA to not rely on openedx

* fix: python version in GHA
  • Loading branch information
christopappas authored Nov 14, 2023
1 parent 5fba044 commit f77f333
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 13 deletions.
54 changes: 41 additions & 13 deletions .github/workflows/upgrade-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,44 @@ on:
default: 'main'

jobs:
call-upgrade-python-requirements-workflow:
uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master
with:
branch: ${{ github.event.inputs.branch || 'main' }}
user_reviewers: edx-revenue-tasks
team_reviewers: ""
email_address: [email protected]
send_success_notification: false
secrets:
requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }}
edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }}
upgrade_requirements:
runs-on: ubuntu-20.04

strategy:
matrix:
python-version: ["3.8"]

steps:
- name: setup target branch
run: echo "target_branch=$(if ['${{ github.event.inputs.branch }}' = '']; then echo 'main'; else echo '${{ github.event.inputs.branch }}'; fi)" >> $GITHUB_ENV

- uses: actions/checkout@v3
with:
ref: ${{ env.target_branch }}

- name: setup python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: make upgrade
run: |
cd $GITHUB_WORKSPACE
make upgrade
- name: setup testeng-ci
run: |
git clone https://github.com/edx/testeng-ci.git
cd $GITHUB_WORKSPACE/testeng-ci
pip install -r requirements/base.txt
- name: create pull request
env:
GITHUB_TOKEN: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
GITHUB_USER_EMAIL: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
run: |
cd $GITHUB_WORKSPACE/testeng-ci
python -m jenkins.pull_request_creator --repo-root=$GITHUB_WORKSPACE \
--target-branch="${{ env.target_branch }}" --base-branch-name="upgrade-python-requirements" \
--commit-message="chore: Updating Python Requirements" --pr-title="Python Requirements Update" \
--pr-body="Python requirements update.Please review the [changelogs](https://openedx.atlassian.net/wiki/spaces/TE/pages/1001521320/Python+Package+Changelogs) for the upgraded packages." \
--user-reviewers="" --team-reviewers="revenue-squad" --delete-old-pull-requests
5 changes: 5 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Team @edx/revenue-squad will be the default owners for
# everything in this repo. Unless a later match takes
# precedence, @edx/revenue-squad will be requested for
# review when someone opens a pull request.
* @edx/revenue-squad

0 comments on commit f77f333

Please sign in to comment.