Skip to content

Commit d7d906f

Browse files
committed
👷 add job to update open-api-framework
1 parent 17fe4a0 commit d7d906f

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/oaf-check.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
oaf-up-to-date:
1212
name: Check for new OAF version
1313
runs-on: ubuntu-latest
14-
14+
continue-on-error: true
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-python@v5
@@ -23,6 +23,31 @@ jobs:
2323
run: pip install $(grep "pip-tools==" requirements/dev.txt)
2424
- name: Run compile dependencies
2525
run: ./bin/compile_dependencies.sh --upgrade-package open-api-framework
26-
2726
- name: Check git diff
2827
run: git diff --exit-code -- requirements/*.txt
28+
29+
create-oaf-update-pr:
30+
name: Create a pull requests to update OAF
31+
runs-on: ubuntu-latest
32+
needs: [oaf-up-to-date]
33+
34+
if: needs.oaf-up-to-date.result == 'failed'
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: actions/setup-python@v5
38+
with:
39+
python-version: ${{ inputs.python-version }}
40+
cache: 'pip'
41+
cache-dependency-path: 'requirements/dev.txt'
42+
- name: Install dependencies
43+
run: pip install $(grep "pip-tools==" requirements/dev.txt)
44+
- name: Run compile dependencies
45+
run: ./bin/compile_dependencies.sh --upgrade-package open-api-framework
46+
- name: Get OAF Version
47+
run: $oaf_version=$(grep -Po '(?<=pip-tools==)[^\n]*' requirements/dev.txt)
48+
- name: Create Branch
49+
run: git branch update/open-api-framework-$oaf_version
50+
- name: Commit Changes
51+
run: git commit -f requires/*.txt -m ':arrow_up: Update oaf to $oaf_version'
52+
- name: log
53+
run: git log

0 commit comments

Comments
 (0)