Skip to content

Use new apt source for kubectl and pin kubectl to 1.29.x #126

Use new apt source for kubectl and pin kubectl to 1.29.x

Use new apt source for kubectl and pin kubectl to 1.29.x #126

Workflow file for this run

name: build-container
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker meta base
id: docker_meta_base
uses: docker/metadata-action@v5
with:
images: ghcr.io/dergeberl/multitool,dergeberl/multitool
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
- name: Docker meta net
id: docker_meta_net
uses: docker/metadata-action@v5
with:
images: ghcr.io/dergeberl/multitool-net,dergeberl/multitool-net
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
- name: Docker meta kubectl
id: docker_meta_kubectl
uses: docker/metadata-action@v5
with:
images: ghcr.io/dergeberl/multitool-kubectl,dergeberl/multitool-kubectl
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build and push basic image
id: docker_build_basic
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta_base.outputs.tags }}
labels: ${{ steps.docker_meta_base.outputs.labels }}
target: base
- name: Build and push network image
id: docker_build_net
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta_net.outputs.tags }}
labels: ${{ steps.docker_meta_net.outputs.labels }}
target: net
- name: Build and push kubectl image
id: docker_build_kubectl
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta_kubectl.outputs.tags }}
labels: ${{ steps.docker_meta_kubectl.outputs.labels }}
target: kubectl