From faf8cb5a8daebee85d47d7578d813cced4cd97d1 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Tue, 31 Dec 2024 08:15:45 -0500 Subject: [PATCH] fix: updates Signed-off-by: Devin Buhl --- .github/workflows/flux-diff.yaml | 46 +++++++----- .github/workflows/helm-repository-sync.yaml | 26 ++++--- .github/workflows/pre-pull-images.yaml | 77 +++++++++++++++------ .github/workflows/schemas.yaml | 48 ++++++++----- 4 files changed, 133 insertions(+), 64 deletions(-) diff --git a/.github/workflows/flux-diff.yaml b/.github/workflows/flux-diff.yaml index 05f7e5556bdd9..97128e81a2ad4 100644 --- a/.github/workflows/flux-diff.yaml +++ b/.github/workflows/flux-diff.yaml @@ -14,9 +14,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.number || github.ref }} cancel-in-progress: true -env: - HOMEBREW_NO_ANALYTICS: "1" - UV_SYSTEM_PYTHON: "1" +# env: +# HOMEBREW_NO_ANALYTICS: "1" +# UV_SYSTEM_PYTHON: "1" jobs: flux-diff: @@ -50,23 +50,37 @@ jobs: ref: "${{ github.event.repository.default_branch }}" path: default - - name: Setup Homebrew - uses: Homebrew/actions/setup-homebrew@master + - name: Setup Workflow Tools + uses: jdx/mise-action@v2 + env: + GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}" with: - stable: true + mise_toml: | + [tools] + python = "3.12" + "aqua:astral-sh/uv" = "latest" + "aqua:fluxcd/flux2" = "latest" + "aqua:helm/helm" = "latest" + "aqua:kubernetes-sigs/kustomize" = "latest" + "pipx:flux-local" = "latest" - - name: Setup Workflow Tools - shell: bash - run: brew install fluxcd/tap/flux helm kustomize uv + # - name: Setup Homebrew + # uses: Homebrew/actions/setup-homebrew@master + # with: + # stable: true - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: 3.12.x + # - name: Setup Workflow Tools + # shell: bash + # run: brew install fluxcd/tap/flux helm kustomize uv - - name: Install Python Dependencies - shell: bash - run: uv pip install flux-local + # - name: Setup Python + # uses: actions/setup-python@v5 + # with: + # python-version: 3.12.x + + # - name: Install Python Dependencies + # shell: bash + # run: uv pip install flux-local - name: Diff Resources shell: bash diff --git a/.github/workflows/helm-repository-sync.yaml b/.github/workflows/helm-repository-sync.yaml index 81221f31d78c1..0fb880cc338a7 100644 --- a/.github/workflows/helm-repository-sync.yaml +++ b/.github/workflows/helm-repository-sync.yaml @@ -16,8 +16,8 @@ on: branches: ["main"] paths: ["kubernetes/**/helmrelease.yaml"] -env: - HOMEBREW_NO_ANALYTICS: "1" +# env: +# HOMEBREW_NO_ANALYTICS: "1" jobs: sync: @@ -37,14 +37,24 @@ jobs: token: "${{ steps.app-token.outputs.token }}" fetch-depth: 0 - - name: Setup Homebrew - uses: Homebrew/actions/setup-homebrew@master + - name: Setup Workflow Tools + uses: jdx/mise-action@v2 + env: + GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}" with: - stable: true + mise_toml: | + [tools] + "aqua:fluxcd/flux2" = "latest" + "aqua:mikefarah/yq" = "latest" - - name: Setup Workflow Tools - shell: bash - run: brew install fluxcd/tap/flux yq + # - name: Setup Homebrew + # uses: Homebrew/actions/setup-homebrew@master + # with: + # stable: true + + # - name: Setup Workflow Tools + # shell: bash + # run: brew install fluxcd/tap/flux yq - if: ${{ github.event.inputs.helmRepoNamespace == '' && github.event.inputs.helmRepoName == '' }} name: Get Changed Files diff --git a/.github/workflows/pre-pull-images.yaml b/.github/workflows/pre-pull-images.yaml index efea518c3ac3d..ea761a6eeb597 100644 --- a/.github/workflows/pre-pull-images.yaml +++ b/.github/workflows/pre-pull-images.yaml @@ -14,9 +14,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.number || github.ref }} cancel-in-progress: true -env: - HOMEBREW_NO_ANALYTICS: "1" - UV_SYSTEM_PYTHON: "1" +# env: +# HOMEBREW_NO_ANALYTICS: "1" +# UV_SYSTEM_PYTHON: "1" jobs: extract-images: @@ -47,23 +47,38 @@ jobs: token: "${{ steps.app-token.outputs.token }}" path: pull - - name: Setup Homebrew - uses: Homebrew/actions/setup-homebrew@master - with: - stable: true + # - name: Setup Homebrew + # uses: Homebrew/actions/setup-homebrew@master + # with: + # stable: true - - name: Setup Workflow Tools - shell: bash - run: brew install fluxcd/tap/flux helm jo kustomize uv yq + # - name: Setup Workflow Tools + # shell: bash + # run: brew install fluxcd/tap/flux helm jo kustomize uv yq - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: 3.12.x + # - name: Setup Python + # uses: actions/setup-python@v5 + # with: + # python-version: 3.12.x - - name: Install Python Dependencies - shell: bash - run: uv pip install flux-local + # - name: Install Python Dependencies + # shell: bash + # run: uv pip install flux-local + + - name: Setup Workflow Tools + uses: jdx/mise-action@v2 + env: + GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}" + with: + mise_toml: | + [tools] + python = "3.12" + "aqua:astral-sh/uv" = "latest" + "aqua:fluxcd/flux2" = "latest" + "aqua:helm/helm" = "latest" + "aqua:kubernetes-sigs/kustomize" = "latest" + "aqua:mikefarah/yq" = "latest" + "pipx:flux-local" = "latest" - name: Gather Images in Default Branch shell: bash @@ -99,7 +114,7 @@ jobs: id: extract-images shell: bash run: | - images=$(jo -a $(grep -vf default.txt pull.txt)) + images=$(jq --compact-output --raw-input --null-input '[inputs]' < <(grep -vf default.txt pull.txt)) echo "images=${images}" >> $GITHUB_OUTPUT echo "${images}" echo "### Images" >> $GITHUB_STEP_SUMMARY @@ -116,14 +131,30 @@ jobs: max-parallel: 4 fail-fast: false steps: - - name: Setup Homebrew - uses: Homebrew/actions/setup-homebrew@master + - name: Generate Token + uses: actions/create-github-app-token@v1 + id: app-token with: - stable: true + app-id: "${{ secrets.BOT_APP_ID }}" + private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" - name: Setup Workflow Tools - shell: bash - run: brew install siderolabs/tap/talosctl + uses: jdx/mise-action@v2 + env: + GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}" + with: + mise_toml: | + [tools] + "aqua:siderolabs/talos" = "latest" + + # - name: Setup Homebrew + # uses: Homebrew/actions/setup-homebrew@master + # with: + # stable: true + + # - name: Setup Workflow Tools + # shell: bash + # run: brew install siderolabs/tap/talosctl - name: Pre-pull Image run: talosctl -n $NODE_IP image pull ${{ matrix.images }} diff --git a/.github/workflows/schemas.yaml b/.github/workflows/schemas.yaml index b23fbc896a13f..fa320b07d6e42 100644 --- a/.github/workflows/schemas.yaml +++ b/.github/workflows/schemas.yaml @@ -10,9 +10,9 @@ on: branches: ["main"] paths: [".github/workflows/schemas.yaml"] -env: - HOMEBREW_NO_ANALYTICS: "1" - UV_SYSTEM_PYTHON: "1" +# env: +# HOMEBREW_NO_ANALYTICS: "1" +# UV_SYSTEM_PYTHON: "1" jobs: publish: @@ -34,27 +34,41 @@ jobs: with: token: "${{ steps.app-token.outputs.token }}" - - name: Setup Homebrew - uses: Homebrew/actions/setup-homebrew@master - with: - stable: true + # - name: Setup Homebrew + # uses: Homebrew/actions/setup-homebrew@master + # with: + # stable: true - - name: Setup Workflow Tools - shell: bash - run: brew install kubectl uv + # - name: Setup Workflow Tools + # shell: bash + # run: brew install kubectl uv - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: 3.12.x + # - name: Setup Python + # uses: actions/setup-python@v5 + # with: + # python-version: 3.12.x + + # - name: Setup Node + # uses: actions/setup-node@v4 + # with: + # node-version: 18.x - - name: Setup Node - uses: actions/setup-node@v4 + - name: Setup Workflow Tools + uses: jdx/mise-action@v2 + env: + GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}" with: - node-version: 18.x + mise_toml: | + [tools] + python = "3.12" + node = "20" + "aqua:astral-sh/uv" = "latest" + "aqua:kubernetes/kubectl" = "latest" - name: Install Python Dependencies run: uv pip install pyyaml + env: + UV_SYSTEM_PYTHON: "1" - name: Download and run crd-extractor shell: bash