|
52 | 52 | matrix:
|
53 | 53 | include: ${{ fromJson(needs.pi-diff.outputs.include) }}
|
54 | 54 | steps:
|
55 |
| - - name: Print matrix values - ${{ matrix.parent_image_type }} |
56 |
| - run: echo "${{ toJson(matrix) }}" |
| 55 | + - name: Checkout Repository |
| 56 | + uses: actions/checkout@v4 |
| 57 | + with: |
| 58 | + repository: '${{ github.repository_owner }}/refinery-${{ matrix.parent_image_type }}-parent-image' |
| 59 | + submodules: 'true' |
| 60 | + |
| 61 | + - name: Set up Python |
| 62 | + uses: actions/setup-python@v5 |
| 63 | + with: |
| 64 | + python-version: ${{ env.PYTHON_VERSION }} |
| 65 | + |
| 66 | + - name: Install Dependencies |
| 67 | + run: python -m pip install pip-tools |
| 68 | + |
| 69 | + - name: Compile Requirements |
| 70 | + run: pip-compile requirements/${{ matrix.parent_image_type }}-requirements.in |
| 71 | + |
| 72 | + - name: Create PR - ${{ matrix.app }} |
| 73 | + run: | |
| 74 | + git clone https://oauth2:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository_owner }}/${{ matrix.app }}.git |
| 75 | + cd ${{ matrix.app }} |
| 76 | +
|
| 77 | + git config user.email "devtools@kern.ai" |
| 78 | + git config user.name "GitHub Actions" |
| 79 | +
|
| 80 | + git checkout -b ${{ github.event.pull_request.head.ref }} || git checkout ${{ github.event.pull_request.head.ref }} |
| 81 | + git push origin ${{ github.event.pull_request.head.ref }} && git pull origin ${{ github.event.pull_request.head.ref }} |
| 82 | +
|
| 83 | + git add requirements/${{ matrix.parent_image_type }}-requirements.txt |
| 84 | + git commit -m "ci: update ${{ matrix.parent_image_type }}-requirements.txt" |
| 85 | + git push origin ${{ github.event.pull_request.head.ref }} |
| 86 | + echo "::notice::${{ matrix.app }} updated to origin/${{ github.event.pull_request.head.ref }}" |
| 87 | +
|
| 88 | + gh pr create \ |
| 89 | + --title "${{ github.event.pull_request.title }}" \ |
| 90 | + --body "${{ github.event.pull_request.body }}" \ |
| 91 | + --base dev \ |
| 92 | + --head ${{ github.event.pull_request.head.ref }} \ |
| 93 | + --repo ${{ github.repository_owner }}/${{ matrix.app }} |
57 | 94 |
|
58 | 95 | # pi-build:
|
59 | 96 | # name: 'Parent Images: Docker Build'
|
|
0 commit comments