Skip to content

feat(github-action): update docker/setup-qemu-action ( v3.5.0 → v3.6.0 ) #142

feat(github-action): update docker/setup-qemu-action ( v3.5.0 → v3.6.0 )

feat(github-action): update docker/setup-qemu-action ( v3.5.0 → v3.6.0 ) #142

---
name: "Publish Schemas"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
push:
branches: ["main"]
paths: [".github/workflows/publish-schemas.yaml"]
env:
DEBCONF_NONINTERACTIVE_SEEN: "true"
DEBIAN_FRONTEND: noninteractive
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE: DontWarn
jobs:
publish-schemas:
name: Publish Schemas
runs-on: ["arc-runner-set-home-ops"]
permissions:
packages: write
contents: read
steps:
- name: Setup Tools
shell: bash
run: |
sudo apt-get -qq update && \
sudo apt-get -qq install --no-install-recommends -y curl
- name: Setup Kube Tools
uses: yokawasa/action-setup-kube-tools@9e25a4277af127b60011c95b6ed2da7e3b3613b1 # v0.11.2
with:
setup-tools: kubectl
- name: Setup Python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: 3.x
- name: Setup QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Generate container metadata
id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with:
images: |
ghcr.io/${{ github.repository_owner }}/kubernetes-schemas
tags: |
type=sha
type=raw,value=latest,enable={{is_default_branch}}
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Write kubeconfig
id: kubeconfig
uses: timheuer/base64-to-file@784a1a4a994315802b7d8e2084e116e783d157be # v1.2.4
with:
encodedString: ${{ secrets.KUBECONFIG }}
fileName: kubeconfig
- name: Download and run crd-extractor
env:
KUBECONFIG: ${{ steps.kubeconfig.outputs.filePath }}
shell: bash
run: |
mkdir -p /home/runner/crds
curl -fsSL -o $GITHUB_WORKSPACE/crd-extractor.sh \
https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/Utilities/crd-extractor.sh
chmod +x $GITHUB_WORKSPACE/crd-extractor.sh
bash $GITHUB_WORKSPACE/crd-extractor.sh
mv /home/runner/.datree/crdSchemas/* /home/runner/crds
- name: Write Dockerfile
shell: bash
run: |
cat <<EOF > Dockerfile
FROM docker.io/nginxinc/nginx-unprivileged:latest
COPY --chown=nginx:nginx --chmod=755 . /usr/share/nginx/html
USER nginx
EOF
- name: Build and publish container
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
context: /home/runner/crds
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: "${{ steps.meta.outputs.tags }}"
labels: "${{ steps.meta.outputs.labels }}"