Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Feb 17, 2025
1 parent 042fd0f commit 480c898
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
inputs:
seal5-ref:
description: "Seal5 Version/Tag/Branch"
required: false
default: "" # TODO: use
required: true
default: "default"
full:
description: "Also build large quickstart image"
required: true
Expand All @@ -30,7 +30,7 @@ jobs:
id: timestamp
- name: "Set os env variable"
run: |
echo "os=$(echo '${{ github.events.inputs.base_image }}' | tr ':' '-')" >> $GITHUB_OUTPUT
echo "os=$(echo '${{ github.event.inputs.base_image }}' | tr ':' '-')" >> $GITHUB_OUTPUT
id: os
- name: Maximize build space
uses: easimon/maximize-build-space@master
Expand All @@ -49,6 +49,13 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
if: ${{ github.repository == 'tum-ei-eda/seal5' }}
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push to Docker Hub
uses: docker/build-push-action@v6
if: ${{ github.repository == 'tum-ei-eda/seal5' }}
Expand All @@ -59,7 +66,7 @@ jobs:
push: true
target: seal5-deps
build-args: |
BASE_IMAGE=${{ github.events.inputs.base_image }}
BASE_IMAGE=${{ github.event.inputs.base_image }}
cache-to: type=inline
tags: |
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_NAMESPACE }}/seal5-deps:${{ steps.timestamp.outputs.builddate }}-${{ github.event.inputs.seal5-ref }}-${{ steps.os.outputs.os }}
Expand All @@ -75,7 +82,7 @@ jobs:
id: timestamp
- name: "Set os env variable"
run: |
echo "os=$(echo '${{ github.events.inputs.base_image }}' | tr ':' '-')" >> $GITHUB_OUTPUT
echo "os=$(echo '${{ github.event.inputs.base_image }}' | tr ':' '-')" >> $GITHUB_OUTPUT
id: os
- name: Maximize build space
uses: easimon/maximize-build-space@master
Expand All @@ -94,12 +101,6 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v3
if: ${{ github.repository == 'tum-ei-eda/seal5' }}
Expand All @@ -117,7 +118,7 @@ jobs:
push: true
target: seal5-base
build-args: |
BASE_IMAGE=${{ github.events.inputs.base_image }}
BASE_IMAGE=${{ github.event.inputs.base_image }}
cache-from: |
type=registry,ref=${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_NAMESPACE }}/seal5-deps:${{ steps.timestamp.outputs.builddate }}-${{ github.event.inputs.seal5-deps }}-${{ steps.os.outputs.os }}
cache-to: type=inline
Expand All @@ -136,7 +137,7 @@ jobs:
id: timestamp
- name: "Set os env variable"
run: |
echo "os=$(echo '${{ github.events.inputs.base_image }}' | tr ':' '-')" >> $GITHUB_OUTPUT
echo "os=$(echo '${{ github.event.inputs.base_image }}' | tr ':' '-')" >> $GITHUB_OUTPUT
id: os
- name: Maximize build space
uses: easimon/maximize-build-space@master
Expand Down Expand Up @@ -177,12 +178,12 @@ jobs:
push: true
target: seal5-quickstart
build-args: |
BASE_IMAGE=${{ github.events.inputs.base_image }}
BASE_IMAGE=${{ github.event.inputs.base_image }}
LLVM_REF=${{ github.event.inputs.llvm_ref }}
cache-from: |
type=registry,ref=${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_NAMESPACE }}/seal5-deps:${{ steps.timestamp.outputs.builddate }}-${{ github.event.inputs.seal5-deps }}-${{ steps.os.outputs.os }}
type=registry,ref=${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_NAMESPACE }}/seal5-base:${{ steps.timestamp.outputs.builddate }}-${{ github.event.inputs.seal5-ref }}-${{ steps.os.outputs.os }}
cache-to: type=inline
tags: |
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_NAMESPACE }}/seal5-quickstart:${{ steps.timestamp.outputs.builddate }}-${{ github.event.inputs.seal5-ref }}-${{ steps.os.outputs.os }}-${{ github.events.inputs.llvm-ref }}
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_NAMESPACE }}/seal5-quickstart:latest-${{ github.event.inputs.seal5-ref }}-${{ steps.os.outputs.os }}-${{ github.events.inputs.llvm-ref }}
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_NAMESPACE }}/seal5-quickstart:${{ steps.timestamp.outputs.builddate }}-${{ github.event.inputs.seal5-ref }}-${{ steps.os.outputs.os }}-${{ github.event.inputs.llvm-ref }}
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_NAMESPACE }}/seal5-quickstart:latest-${{ github.event.inputs.seal5-ref }}-${{ steps.os.outputs.os }}-${{ github.event.inputs.llvm-ref }}

0 comments on commit 480c898

Please sign in to comment.