Skip to content

Commit

Permalink
👷 add job to update open-api-framework
Browse files Browse the repository at this point in the history
  • Loading branch information
Coperh committed Nov 8, 2024
1 parent 17fe4a0 commit d7d906f
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/oaf-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
oaf-up-to-date:
name: Check for new OAF version
runs-on: ubuntu-latest

continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -23,6 +23,31 @@ jobs:
run: pip install $(grep "pip-tools==" requirements/dev.txt)
- name: Run compile dependencies
run: ./bin/compile_dependencies.sh --upgrade-package open-api-framework

- name: Check git diff
run: git diff --exit-code -- requirements/*.txt

create-oaf-update-pr:
name: Create a pull requests to update OAF
runs-on: ubuntu-latest
needs: [oaf-up-to-date]

if: needs.oaf-up-to-date.result == 'failed'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements/dev.txt'
- name: Install dependencies
run: pip install $(grep "pip-tools==" requirements/dev.txt)
- name: Run compile dependencies
run: ./bin/compile_dependencies.sh --upgrade-package open-api-framework
- name: Get OAF Version
run: $oaf_version=$(grep -Po '(?<=pip-tools==)[^\n]*' requirements/dev.txt)
- name: Create Branch
run: git branch update/open-api-framework-$oaf_version
- name: Commit Changes
run: git commit -f requires/*.txt -m ':arrow_up: Update oaf to $oaf_version'
- name: log
run: git log

0 comments on commit d7d906f

Please sign in to comment.