Skip to content

feat: validate fqdns #3762

feat: validate fqdns

feat: validate fqdns #3762

---
name: Build and push container images
env:
CONTAINER_IMAGE_REGISTRY: ghcr.io
permissions:
contents: read
on: # yamllint disable-line rule:truthy
push: null
pull_request: null
jobs:
build-container-images:
concurrency:
# Ref: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
# github.head_ref: head_ref or source branch of the pull request
# github.ref: ref of the branch that triggered the workflow
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-${{ github.event_name }}-${{ matrix.container-images.name }}
cancel-in-progress: true
env:
CONTAINER_IMAGE_ID: "${{ github.repository }}-${{ matrix.container-images.name }}"
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: |
${{ env.CONTAINER_IMAGE_REGISTRY }}/${{ env.CONTAINER_IMAGE_ID }}
labels: |
org.opencontainers.image.title=home-lab-${{ matrix.container-images.name }}
org.opencontainers.image.description=${{ matrix.container-images.name }} container image
tags: |
type=edge,enable={{is_default_branch}}
type=ref,event=branch,enable={{is_default_branch}}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build the ${{ matrix.container-images.name }} container image
uses: docker/build-push-action@v5
with:
build-contexts: ${{ matrix.container-images.build-contexts }}
cache-from: type=gha
cache-to: type=gha,mode=max
context: ${{ matrix.container-images.context-directory }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
strategy:
matrix:
container-images:
- name: ansible
build-contexts: |
ansible-configuration=config/ansible
context-directory: docker/ansible
- name: arduino-cli
build-contexts: null
context-directory: docker/arduino-cli
- name: dependency-updates-helper
build-contexts: null
context-directory: config/ansible/roles/ferrarimarco_home_lab_node/files/config/dependency-updates-helper
- name: restic
build-contexts: null
context-directory: config/ansible/roles/ferrarimarco_home_lab_node/files/config/restic
- name: cd-container
build-contexts: null
context-directory: docker/release-please-commitlint
...