Skip to content

a fix? 2

a fix? 2 #50

name: Build and push docker images
on:
workflow_dispatch:
inputs:
force_rebuild:
description: 'Force rebuild of all images'
default: false
type: boolean
push:
branches:
- '**'
tags:
- 'v*'
env:
REGISTRY: ghcr.io
DOCKER_DIRECTORY: docker/images/
jobs:
evaluate-force-rebuild:
name: Evaluate force rebuild
runs-on: ubuntu-22.04
outputs:
force_rebuild: ${{ steps.check.outputs.force_rebuild }}
steps:
- name: Evaluate force rebuild
id: check
run:
echo "force_rebuild=${{ inputs.force_rebuild || (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/' )) || false }}" >> $GITHUB_OUTPUT
# One job for each image, since the images build on top of each other a matrix strategy is not possible
everest-clang-format:
needs:
- evaluate-force-rebuild
name: Build and push everest-clang-format docker image
uses: ./.github/workflows/deploy-single-docker-image.yml
secrets:
SA_GITHUB_PAT: ${{ secrets.SA_GITHUB_PAT }}
SA_GITHUB_USERNAME: ${{ secrets.SA_GITHUB_USERNAME }}
with:
force_rebuild: ${{ needs.evaluate-force-rebuild.outputs.force_rebuild == 'true' }}
image_name: everest-clang-format
docker_directory: ${{ github.env.DOCKER_DIRECTORY }}
docker_registry: ${{ github.env.REGISTRY }}
github_ref_before: ${{ github.event.before }}
github_ref_after: ${{ github.event.after }}
run-env-base:
needs:
- evaluate-force-rebuild
name: Build and push run-env-base docker image
uses: ./.github/workflows/deploy-single-docker-image.yml
secrets:
SA_GITHUB_PAT: ${{ secrets.SA_GITHUB_PAT }}
SA_GITHUB_USERNAME: ${{ secrets.SA_GITHUB_USERNAME }}
with:
force_rebuild: ${{ needs.evaluate-force-rebuild.outputs.force_rebuild == 'true' }}
image_name: run-env-base
docker_directory: ${{ github.env.DOCKER_DIRECTORY }}
docker_registry: ${{ github.env.REGISTRY }}
github_ref_before: ${{ github.event.before }}
github_ref_after: ${{ github.event.after }}
build-env-base:
needs:
- evaluate-force-rebuild
- run-env-base
name: Build and push build-env-base docker image
uses: ./.github/workflows/deploy-single-docker-image.yml
secrets:
SA_GITHUB_PAT: ${{ secrets.SA_GITHUB_PAT }}
SA_GITHUB_USERNAME: ${{ secrets.SA_GITHUB_USERNAME }}
with:
force_rebuild: ${{ needs.evaluate-force-rebuild.outputs.force_rebuild == 'true' }}
image_name: build-env-base
docker_directory: ${{ github.env.DOCKER_DIRECTORY }}
docker_registry: ${{ github.env.REGISTRY }}
github_ref_before: ${{ github.event.before }}
github_ref_after: ${{ github.event.after }}
dev-env-base:
needs:
- evaluate-force-rebuild
- build-env-base
name: Build and push dev-env-base docker image
uses: ./.github/workflows/deploy-single-docker-image.yml
secrets:
SA_GITHUB_PAT: ${{ secrets.SA_GITHUB_PAT }}
SA_GITHUB_USERNAME: ${{ secrets.SA_GITHUB_USERNAME }}
with:
force_rebuild: ${{ needs.evaluate-force-rebuild.outputs.force_rebuild == 'true' }}
image_name: dev-env-base
docker_directory: ${{ github.env.DOCKER_DIRECTORY }}
docker_registry: ${{ github.env.REGISTRY }}
github_ref_before: ${{ github.event.before }}
github_ref_after: ${{ github.event.after }}
build-kit:
needs:
- evaluate-force-rebuild
- build-env-base
name: Build and push build-kit docker image
uses: ./.github/workflows/deploy-single-docker-image.yml
secrets:
SA_GITHUB_PAT: ${{ secrets.SA_GITHUB_PAT }}
SA_GITHUB_USERNAME: ${{ secrets.SA_GITHUB_USERNAME }}
with:
force_rebuild: ${{ needs.evaluate-force-rebuild.outputs.force_rebuild == 'true' }}
image_name: build-kit
docker_directory: ${{ github.env.DOCKER_DIRECTORY }}
docker_registry: ${{ github.env.REGISTRY }}
github_ref_before: ${{ github.event.before }}
github_ref_after: ${{ github.event.after }}