Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ jobs:
- name: Set container name as output
id: set_output
run: |
BRANCH=$(echo "${GITHUB_REF}" | sed 's|refs/heads/||' | tr '[:upper:]' '[:lower:]')
REPO=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')
CONTAINER_NAME="ghcr.io/${REPO}/devcontainer:${BRANCH//\//-}"
CONTAINER_NAME="ghcr.io/${REPO}/devcontainer:main"
echo "container_name=$CONTAINER_NAME" >> $GITHUB_OUTPUT
echo "container_without_tag=ghcr.io/${REPO}/devcontainer" >> $GITHUB_OUTPUT

Expand All @@ -49,17 +48,15 @@ jobs:
with:
context: .devcontainer
file: .devcontainer/Dockerfile
push: true
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ steps.set_output.outputs.container_name }}
cache-from: |
type=registry,ref=${{ steps.set_output.outputs.container_name }}-cache
type=registry,ref=${{ steps.set_output.outputs.container_without_tag }}:main-cache
cache-from: type=registry,ref=${{ steps.set_output.outputs.container_name }}-cache
cache-to: type=registry,ref=${{ steps.set_output.outputs.container_name }}-cache,mode=max

test:
name: Testing
needs: [container]
runs-on: ubuntu-latest
needs: [container]
container:
image: ${{ needs.container.outputs.container_name }}
permissions:
Expand Down Expand Up @@ -88,8 +85,8 @@ jobs:

fmt:
name: Check formatting
needs: [container]
runs-on: ubuntu-latest
needs: [container]
container:
image: ${{ needs.container.outputs.container_name }}
steps:
Expand All @@ -103,8 +100,8 @@ jobs:

kani:
name: Kani verification
needs: [container]
runs-on: ubuntu-latest
needs: [container]
container:
image: ${{ needs.container.outputs.container_name }}
steps:
Expand All @@ -121,8 +118,8 @@ jobs:

build-stm32-l4r5zi-def:
name: Build for the STM32 Nucleo L4R5ZI
needs: [container]
runs-on: ubuntu-latest
needs: [container]
container:
image: ${{ needs.container.outputs.container_name }}
steps:
Expand Down
Loading