Skip to content

Update docker.yaml

Update docker.yaml #29

Workflow file for this run

name: Docker publish
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
jobs:
generate-jobs:
name: cpusets-controller-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
-
name: cpusets-controller
image: dongjiang1989/cpusets-controller:latest
file: ./hack/build/Dockerfile.cpusets
platforms: linux/amd64,linux/arm64
-
name: cpusets-device-plugin
image: dongjiang1989/cpusets-device-plugin:latest
file: ./hack/build/Dockerfile.deviceplugin
platforms: linux/amd64,linux/arm64
-
name: cpusets-webhook
image: dongjiang1989/cpusets-webhook:latest
file: ./hack/build/Dockerfile.webhook
platforms: linux/amd64,linux/arm64
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
file: ${{ matrix.file }}
platforms: ${{ matrix.platforms }}
push: true
tags: ${{ matrix.image }}
- name: Test ${{ matrix.name }}
run: |
docker pull ${{matrix.image}}
docker image inspect ${{ matrix.image}}