this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Schema thing

+126
+126
.github/workflows/publish-schemas.yaml
··· 1 + --- 2 + name: "Publish Schemas" 3 + 4 + on: 5 + workflow_dispatch: 6 + schedule: 7 + - cron: "0 0 * * 0" 8 + push: 9 + branches: ["main"] 10 + paths: [".github/workflows/publish-schemas.yaml"] 11 + 12 + jobs: 13 + publish-manifests: 14 + name: Publish Manifests 15 + runs-on: ["arc-runner-set-home-ops"] 16 + steps: 17 + - name: Setup Flux 18 + uses: fluxcd/flux2/action@9b3162495ce1b99b1fcdf137c553f543eafe3ec7 # v2.0.1 19 + 20 + - name: Setup Kube Tools 21 + uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3 22 + with: 23 + setup-tools: kubectl 24 + 25 + - name: Setup Python 26 + uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 27 + with: 28 + python-version: 3.x 29 + 30 + - name: Login to GitHub Container Registry 31 + uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 32 + with: 33 + registry: ghcr.io 34 + username: "${{ github.actor }}" 35 + password: "${{ secrets.GITHUB_TOKEN }}" 36 + 37 + - name: Setup crd-extractor 38 + uses: robinraju/release-downloader@efa4cd07bd0195e6cc65e9e30c251b49ce4d3e51 # v1.8 39 + with: 40 + repository: datreeio/CRDs-catalog 41 + latest: true 42 + fileName: crd-extractor.zip 43 + 44 + - name: Write kubeconfig 45 + id: kubeconfig 46 + uses: timheuer/base64-to-file@ca9e30baf83f7f26708fb0059af9a0973fe5f27e # v1.2 47 + with: 48 + encodedString: ${{ secrets.KUBECONFIG }} 49 + fileName: kubeconfig 50 + 51 + - name: Run crd-extractor 52 + env: 53 + KUBECONFIG: ${{ steps.kubeconfig.outputs.filePath }} 54 + shell: bash 55 + run: | 56 + unzip -j $GITHUB_WORKSPACE/crd-extractor.zip -d $GITHUB_WORKSPACE 57 + bash $GITHUB_WORKSPACE/crd-extractor.sh 58 + 59 + - name: Generate tag 60 + id: generate-tag 61 + shell: bash 62 + run: echo "tag=ghcr.io/${{ github.repository_owner }}/manifests/kubernetes-schemas:$(git rev-parse --short HEAD)" >> "${GITHUB_OUTPUT}" 63 + 64 + - name: Publish manifests 65 + shell: bash 66 + run: | 67 + flux push artifact oci://${{ steps.generate-tag.outputs.tag }} \ 68 + --path="/home/runner/.datree/crdSchemas" \ 69 + --source="${{ github.repositoryUrl }}" \ 70 + --revision="${{ github.ref_name }}@sha1:$(git rev-parse HEAD)" 71 + 72 + - name: Tag manifests 73 + shell: bash 74 + run: flux tag artifact oci://${{ steps.generate-tag.outputs.tag }} --tag main 75 + 76 + publish-web: 77 + name: Publish Web 78 + runs-on: ubuntu-latest 79 + needs: ["publish-manifests"] 80 + steps: 81 + - name: Setup Flux 82 + uses: fluxcd/flux2/action@9b3162495ce1b99b1fcdf137c553f543eafe3ec7 # v2.0.1 83 + 84 + - name: Setup QEMU 85 + uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 86 + 87 + - name: Setup Docker Buildx 88 + id: buildx 89 + uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2.9.1 90 + 91 + - name: Login to GitHub Container Registry 92 + uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 93 + with: 94 + registry: ghcr.io 95 + username: "${{ github.actor }}" 96 + password: "${{ secrets.GITHUB_TOKEN }}" 97 + 98 + - name: Pull manifests 99 + shell: bash 100 + run: | 101 + mkdir -p /home/runner/crdSchemas 102 + flux pull artifact oci://ghcr.io/${{ github.repository_owner }}/manifests/kubernetes-schemas:$(git rev-parse --short HEAD) --output /home/runner/crdSchemas 103 + 104 + - name: Write nginx-unprivileged Dockerfile 105 + shell: bash 106 + run: | 107 + cat <<EOF > /home/runner/crdSchemas/Dockerfile 108 + FROM docker.io/nginxinc/nginx-unprivileged:latest 109 + COPY --chown=nginx:nginx --chmod=755 . /usr/share/nginx/html 110 + USER nginx 111 + EOF 112 + 113 + - name: Publish web container 114 + uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 115 + with: 116 + context: /home/runner/crdSchemas 117 + platforms: linux/amd64,linux/arm64 118 + file: /home/runner/crdSchemas/Dockerfile 119 + push: true 120 + tags: | 121 + ghcr.io/${{ github.repository_owner }}/kubernetes-schemas:latest 122 + cache-from: type=gha 123 + cache-to: type=gha,mode=max 124 + labels: | 125 + org.opencontainers.image.source="${{ github.repositoryUrl }}" 126 + org.opencontainers.image.authors="Devin Buhl <onedr0p@users.noreply.github.com>"