Skip to content

Commit

Permalink
fix: checkout parent image repo instead of submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
andhreljaKern committed Dec 13, 2024
1 parent bd4152c commit b3bd37a
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/pi_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Dependencies
if: matrix.parent_image_type != 'next'
run: python -m pip install pip-tools

- name: Compile Requirements
Expand Down Expand Up @@ -132,21 +133,29 @@ jobs:
matrix:
include: ${{ fromJson(needs.pi-matrix.outputs.include) }}
steps:
- name: Checkout Repository
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
repository: '${{ github.repository_owner }}/refinery-${{ matrix.parent_image_type }}-parent-image'
fetch-depth: 0
submodules: 'true'

- name: Set up Python
if: matrix.parent_image_type != 'next'
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Dependencies
if: matrix.parent_image_type != 'next'
run: python -m pip install pip-tools

- name: Compile Requirements
run: |
cd ${{ github.workspace }}/submodules/parent-images
git checkout ${{ env.HEAD_REF }}
pip-compile requirements/${{ matrix.parent_image_type }}-requirements.in
- name: Clone cicd-deployment-scripts
run: git clone https://oauth2:${{ secrets.GH_TOKEN }}@github.com/code-kern-ai/cicd-deployment-scripts.git

Expand All @@ -163,12 +172,11 @@ jobs:
- name: Compile Requirements (Python)
if: matrix.parent_image_type != 'next'
run: |
cd ${{ github.workspace }}/${{ matrix.app }}/submodules/parent-images
cd ${{ github.workspace }}/submodules/parent-images
git checkout ${{ env.HEAD_REF }}
cd ${{ github.workspace }}/${{ matrix.app }}
pip-compile --quiet \
--output-file requirements/${{ matrix.parent_image_type }}-requirements.txt \
submodules/parent-images/requirements/${{ matrix.parent_image_type }}-requirements.in
--output-file ${{ github.workspace }}/${{ matrix.app }}/requirements/${{ matrix.parent_image_type }}-requirements.txt \
requirements/${{ matrix.parent_image_type }}-requirements.in
- name: Compile Requirements (Next)
if: matrix.parent_image_type == 'next'
Expand Down

0 comments on commit b3bd37a

Please sign in to comment.