feat: support vclusters #58
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
name: Build and Publish manager/installer | |
on: | |
push: | |
tags: | |
- "*" | |
branches: | |
- "*" | |
- "!main" | |
env: | |
REGISTRY: ghcr.io | |
INSTALLER_IMAGE_NAME: ${{ github.repository }}-installer | |
MANAGER_IMAGE_NAME: ${{ github.repository }}-manager | |
CRIU_IMAGE_NAME: ${{ github.repository }}-criu | |
jobs: | |
push_to_registry: | |
permissions: write-all | |
name: Push Docker images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Extract metadata for installer | |
id: meta_installer | |
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
with: | |
tags: | | |
type=semver,pattern={{version}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=sha | |
images: ${{ env.REGISTRY }}/${{ env.INSTALLER_IMAGE_NAME }} | |
- name: Extract metadata for manager | |
id: meta_manager | |
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
with: | |
tags: | | |
type=semver,pattern={{version}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=sha | |
images: ${{ env.REGISTRY }}/${{ env.MANAGER_IMAGE_NAME }} | |
- name: Build and push installer | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./cmd/installer/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ steps.meta_installer.outputs.tags }} | |
labels: ${{ steps.meta_installer.outputs.labels }} | |
- name: Build and push manager | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./cmd/manager/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ steps.meta_manager.outputs.tags }} | |
labels: ${{ steps.meta_manager.outputs.labels }} |