This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
[Auto Generation] Adding new release version #124
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: node-feature-discovery | |
on: | |
push: | |
paths: | |
- '.github/workflows/node-feature-discovery.yml' | |
- 'build/node-feature-discovery/**' | |
- '!build/node-feature-discovery/*.md' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Prepare | |
id: prep | |
run: | | |
BASE_DIR=build/node-feature-discovery | |
VERSION=$(cat ${BASE_DIR}/.version) | |
NFD_BASE_DIR=node-feature-discovery | |
echo ::set-output name=base_dir::${BASE_DIR} | |
echo ::set-output name=version::${VERSION} | |
echo ::set-output name=nfd_base_dir::${NFD_BASE_DIR} | |
- name: Checkout node-feature-discovery repo | |
uses: actions/checkout@v2 | |
with: | |
repository: kubernetes-sigs/node-feature-discovery | |
ref: ${{ steps.prep.outputs.version }} | |
path: node-feature-discovery | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v1 | |
with: | |
platforms: amd64,arm64,arm | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
with: | |
install: true | |
version: latest | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build Full Container Image - Git Reference | |
if: github.ref != 'refs/heads/main' | |
uses: docker/build-push-action@v2 | |
with: | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
target: full | |
build-args: | | |
VERSION=${{ steps.prep.outputs.version }} | |
BASE_IMAGE_FULL=debian:buster-slim | |
BASE_IMAGE_MINIMAL=gcr.io/distroless/base | |
HOSTMOUNT_PREFIX=/host- | |
file: ${{ steps.prep.outputs.nfd_base_dir }}/Dockerfile | |
context: ${{ steps.prep.outputs.nfd_base_dir }} | |
tags: raspbernetes/node-feature-discovery:${{ github.sha }} | |
push: true | |
- name: Build Minimal Container Image - Git Reference | |
if: github.ref != 'refs/heads/main' | |
uses: docker/build-push-action@v2 | |
with: | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
target: minimal | |
build-args: | | |
VERSION=${{ steps.prep.outputs.version }} | |
BASE_IMAGE_FULL=debian:buster-slim | |
BASE_IMAGE_MINIMAL=gcr.io/distroless/base | |
HOSTMOUNT_PREFIX=/host- | |
file: ${{ steps.prep.outputs.nfd_base_dir }}/Dockerfile | |
context: ${{ steps.prep.outputs.nfd_base_dir }} | |
tags: raspbernetes/node-feature-discovery:${{ github.sha }}-minimal | |
push: true | |
- name: Build Full Container Image - Release | |
if: github.ref == 'refs/heads/main' | |
uses: docker/build-push-action@v2 | |
with: | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
target: full | |
build-args: | | |
VERSION=${{ steps.prep.outputs.version }} | |
BASE_IMAGE_FULL=debian:buster-slim | |
BASE_IMAGE_MINIMAL=gcr.io/distroless/base | |
HOSTMOUNT_PREFIX=/host- | |
file: ${{ steps.prep.outputs.nfd_base_dir }}/Dockerfile | |
context: ${{ steps.prep.outputs.nfd_base_dir }} | |
tags: | | |
k8sathome/node-feature-discovery:latest | |
k8sathome/node-feature-discovery:${{ steps.prep.outputs.version }} | |
raspbernetes/node-feature-discovery:${{ steps.prep.outputs.version }} | |
push: true | |
- name: Build Minimal Container Image - Release | |
if: github.ref == 'refs/heads/main' | |
uses: docker/build-push-action@v2 | |
with: | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
target: minimal | |
build-args: | | |
VERSION=${{ steps.prep.outputs.version }} | |
BASE_IMAGE_FULL=debian:buster-slim | |
BASE_IMAGE_MINIMAL=gcr.io/distroless/base | |
HOSTMOUNT_PREFIX=/host- | |
file: ${{ steps.prep.outputs.nfd_base_dir }}/Dockerfile | |
context: ${{ steps.prep.outputs.nfd_base_dir }} | |
tags: | | |
k8sathome/node-feature-discovery:latest-minimal | |
k8sathome/node-feature-discovery:${{ steps.prep.outputs.version }}-minimal | |
raspbernetes/node-feature-discovery:${{ steps.prep.outputs.version }}-minimal | |
push: true |