Merge pull request #776 from gefyrahq/dependabot/pip/operator/coverag… #644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build all of Gefyra's container images multi-arch | |
name: Build Container Images | |
# Controls when the workflow will run | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: [ main ] | |
tags: | |
- "*" | |
permissions: | |
packages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# https://github.com/docker/setup-qemu-action | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
# https://github.com/docker/setup-buildx-action | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to quay.io | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_ROBOT }} | |
password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
# | |
# Gefyra Operator | |
# | |
- name: Operator Image meta | |
id: operator_meta | |
uses: docker/metadata-action@v5 | |
with: | |
flavor: | | |
latest=false | |
images: | | |
quay.io/gefyra/operator | |
tags: | | |
type=raw,value=latest,enable=${{ !startsWith(github.ref, 'refs/tags/') }} | |
type=raw,value={{tag}},enable=${{ startsWith(github.ref, 'refs/tags/') }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
env: | |
DOCKER_BUILD_NO_SUMMARY: true | |
with: | |
context: operator/ | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.operator_meta.outputs.tags }} | |
cache-from: type=registry,ref=${{ steps.operator_meta.outputs.tags }} | |
cache-to: type=inline | |
# | |
# Gefyra Cargo | |
# | |
- name: Cargo Image meta | |
uses: docker/metadata-action@v5 | |
id: cargo_meta | |
with: | |
flavor: | | |
latest=false | |
images: | | |
quay.io/gefyra/cargo | |
tags: | | |
type=raw,value=latest,enable=${{ !startsWith(github.ref, 'refs/tags/') }} | |
type=raw,value={{tag}},enable=${{ startsWith(github.ref, 'refs/tags/') }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
env: | |
DOCKER_BUILD_NO_SUMMARY: true | |
with: | |
context: cargo/ | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
target: cargo | |
tags: ${{ steps.cargo_meta.outputs.tags }} | |
- name: Cargo Windows Image meta | |
uses: docker/metadata-action@v5 | |
id: cargo_win_meta | |
with: | |
flavor: | | |
latest=false | |
images: | | |
quay.io/gefyra/cargo-win | |
tags: | | |
type=raw,value=latest,enable=${{ !startsWith(github.ref, 'refs/tags/') }} | |
type=raw,value={{tag}},enable=${{ startsWith(github.ref, 'refs/tags/') }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
env: | |
DOCKER_BUILD_NO_SUMMARY: true | |
with: | |
context: cargo/ | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
target: cargo-win | |
tags: ${{ steps.cargo_win_meta.outputs.tags }} | |
# | |
# Gefyra Carrier | |
# | |
- name: Carrier Image meta | |
uses: docker/metadata-action@v5 | |
id: carrier_meta | |
with: | |
flavor: | | |
latest=false | |
images: | | |
quay.io/gefyra/carrier | |
tags: | | |
type=raw,value=latest,enable=${{ !startsWith(github.ref, 'refs/tags/') }} | |
type=raw,value={{tag}},enable=${{ startsWith(github.ref, 'refs/tags/') }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
env: | |
DOCKER_BUILD_NO_SUMMARY: true | |
with: | |
context: carrier/ | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.carrier_meta.outputs.tags }} | |
cache-from: type=registry,ref=${{ steps.carrier_meta.outputs.tags }} | |
cache-to: type=inline | |
# | |
# Gefyra Stowaway | |
# | |
- name: Stowaway Image meta | |
uses: docker/metadata-action@v5 | |
id: stowaway_meta | |
with: | |
flavor: | | |
latest=false | |
images: | | |
quay.io/gefyra/stowaway | |
tags: | | |
type=raw,value=latest,enable=${{ !startsWith(github.ref, 'refs/tags/') }} | |
type=raw,value={{tag}},enable=${{ startsWith(github.ref, 'refs/tags/') }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
env: | |
DOCKER_BUILD_NO_SUMMARY: true | |
with: | |
context: stowaway/ | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.stowaway_meta.outputs.tags }} | |
cache-from: type=registry,ref=${{ steps.stowaway_meta.outputs.tags }} | |
cache-to: type=inline |