Skip to content

Commit

Permalink
ci: fix docker job
Browse files Browse the repository at this point in the history
  • Loading branch information
spernsteiner committed Feb 18, 2025
1 parent 9b7986a commit c077089
Showing 1 changed file with 45 additions and 28 deletions.
73 changes: 45 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -486,49 +486,78 @@ jobs:
runs-on: ubuntu-latest
needs:
- mps-build
- vm_images
- vm_runner
- libgpiod
- vhost_device
- pkvm
- qemu
- vm_image_base
- vm_images
- ardupilot
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache results
id: cache
uses: actions/cache@v3
- name: Checkout submodules
run: |
git submodule update --init components/autopilot/ardupilot
git submodule update --init src/pkvm_setup/libgpiod
git submodule update --init src/pkvm_setup/linux-pkvm
git submodule update --init src/pkvm_setup/qemu
git submodule update --init src/pkvm_setup/vhost-device
- name: "Cache restore: mps-build"
uses: actions/cache/restore@v3
with:
key: ${{ env.CACHE_KEY }}
path: packages/${{ env.CACHE_KEY }}.tar.gz
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
name: "Cache restore: vm_runner"
key: ${{ needs.mps-build.outputs.CACHE_KEY }}
path: packages/${{ needs.mps-build.outputs.CACHE_KEY }}.tar.gz
fail-on-cache-miss: true
- name: "Cache restore: vm_runner"
uses: actions/cache/restore@v3
with:
key: ${{ needs.vm_runner.outputs.CACHE_KEY }}
path: packages/${{ needs.vm_runner.outputs.CACHE_KEY }}.tar.gz
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
name: "Cache restore: vhost_device"
fail-on-cache-miss: true
- name: "Cache restore: libgpiod"
uses: actions/cache/restore@v3
with:
key: ${{ needs.libgpiod.outputs.CACHE_KEY }}
path: packages/${{ needs.libgpiod.outputs.CACHE_KEY }}.tar.gz
fail-on-cache-miss: true
- name: "Cache restore: vhost_device"
uses: actions/cache/restore@v3
with:
key: ${{ needs.vhost_device.outputs.CACHE_KEY }}
path: packages/${{ needs.vhost_device.outputs.CACHE_KEY }}.tar.gz
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
name: "Cache restore: pkvm"
fail-on-cache-miss: true
- name: "Cache restore: pkvm"
uses: actions/cache/restore@v3
with:
key: ${{ needs.pkvm.outputs.CACHE_KEY }}
path: packages/${{ needs.pkvm.outputs.CACHE_KEY }}.tar.gz
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
name: "Cache restore: qemu"
fail-on-cache-miss: true
- name: "Cache restore: qemu"
uses: actions/cache/restore@v3
with:
key: ${{ needs.qemu.outputs.CACHE_KEY }}
path: packages/${{ needs.qemu.outputs.CACHE_KEY }}.tar.gz
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
name: "Cache restore: vm_image_base"
fail-on-cache-miss: true
- name: "Cache restore: vm_image_base"
uses: actions/cache/restore@v3
with:
key: ${{ needs.vm_image_base.outputs.CACHE_KEY }}
path: packages/${{ needs.vm_image_base.outputs.CACHE_KEY }}.tar.gz
fail-on-cache-miss: true
- name: "Cache restore: vm_images"
uses: actions/cache/restore@v3
with:
key: ${{ needs.vm_images.outputs.CACHE_KEY }}
path: packages/${{ needs.vm_images.outputs.CACHE_KEY }}.tar.gz
fail-on-cache-miss: true
- name: "Cache restore: ardupilot"
uses: actions/cache/restore@v3
with:
key: ${{ needs.ardupilot.outputs.CACHE_KEY }}
path: packages/${{ needs.ardupilot.outputs.CACHE_KEY }}.tar.gz
fail-on-cache-miss: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -541,15 +570,3 @@ jobs:
docker build . --file Dockerfile --tag ${{env.OPENSUT_BASE_IMAGE_ID}}
- name: Push the Docker image
run: docker push ${{env.OPENSUT_BASE_IMAGE_ID}}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Build and push
# uses: docker/build-push-action@v6
# with:
# platforms: linux/amd64
# tags: ${{env.OPENSUT_BASE_IMAGE_ID}}
# file: Dockerfile
# github-token: ${{ secrets.VERSE_OPENSUT_ACCESS_TOKEN }}
# push: true

0 comments on commit c077089

Please sign in to comment.