Skip to content

Commit

Permalink
feat(github): try mise again
Browse files Browse the repository at this point in the history
  • Loading branch information
buroa committed Dec 28, 2024
1 parent 9f54bc9 commit 4d74be8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/helm-repository-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ jobs:
name: Helm Repository Sync
runs-on: ["gha-runner-scale-set"]
steps:
- name: Setup mise
uses: jdx/mise-action@v2
with:
mise_toml: |
[tools]
"aqua:fluxcd/flux2" = "latest"
"aqua:mikefarah/yq" = "latest"
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"

- name: Setup Path
run: echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH

- name: Setup Workflow Tools
run: brew update && brew install fluxcd/tap/flux yq

- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -47,10 +49,6 @@ jobs:
files: kubernetes/**/helmrelease.yaml
safe_output: false

- if: ${{ github.event.inputs.helmRepoNamespace == '' && github.event.inputs.helmRepoName == '' }}
name: List All Changed Files
run: echo "${{ steps.changed-files.outputs.all_changed_and_modified_files }}"

- if: ${{ github.event.inputs.helmRepoNamespace == '' && github.event.inputs.helmRepoName == '' }}
name: Sync Helm Repository
shell: bash
Expand All @@ -64,15 +62,13 @@ jobs:
mapfile -t repos < <(printf "%s\n" "${repos[@]}" | sort -u)
for r in "${repos[@]}"; do
IFS=':' read -r repo_namespace repo_name <<< "${r}"
flux \
--namespace ${repo_namespace} \
flux --namespace ${repo_namespace} \
reconcile source helm ${repo_name}
done
- if: ${{ github.event.inputs.helmRepoNamespace != '' && github.event.inputs.helmRepoName != '' }}
name: Sync Helm Repository
shell: bash
run: |
flux \
--namespace ${{ github.event.inputs.helmRepoNamespace }} \
flux --namespace ${{ github.event.inputs.helmRepoNamespace }} \
reconcile source helm ${{ github.event.inputs.helmRepoName }}
24 changes: 13 additions & 11 deletions .github/workflows/pre-pull-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@ jobs:
outputs:
matrix: ${{ steps.extract-images.outputs.images }}
steps:
- name: Setup mise
uses: jdx/mise-action@v2
with:
mise_toml: |
[tools]
"aqua:mikefarah/yq" = "latest"
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"

- name: Setup Path
run: echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH

- name: Setup Workflow Tools
run: brew update && brew install jq yq

- name: Checkout Default Branch
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -98,11 +99,12 @@ jobs:
max-parallel: 4
fail-fast: false
steps:
- name: Setup Path
run: echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH

- name: Setup Workflow Tools
run: brew update && brew install siderolabs/tap/talosctl
- name: Setup mise
uses: jdx/mise-action@v2
with:
mise_toml: |
[tools]
"aqua:siderolabs/talos" = "latest"
- name: Pre-pull Image
run: talosctl -n $NODE_IP image pull ${{ matrix.images }}
Expand Down

0 comments on commit 4d74be8

Please sign in to comment.