Skip to content

Commit

Permalink
renovate again - fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoosaar committed Nov 5, 2024
1 parent f777c03 commit 73e8f2e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 43 deletions.
File renamed without changes.
78 changes: 35 additions & 43 deletions .github/workflows/flux-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,48 @@ concurrency:
cancel-in-progress: true

jobs:
changed-clusters:
name: Changed Clusters
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.changed-clusters.outputs.all_changed_and_modified_files }}
steps:
- 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 }}"
# changed-clusters:
# name: Changed Clusters
# runs-on: ubuntu-latest
# outputs:
# matrix: ${{ steps.changed-clusters.outputs.all_changed_and_modified_files }}
# steps:
# - 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: Checkout Default Branch
uses: actions/checkout@v4
with:
token: "${{ steps.app-token.outputs.token }}"
fetch-depth: 0
# - name: Checkout Default Branch
# uses: actions/checkout@v4
# with:
# token: "${{ steps.app-token.outputs.token }}"
# fetch-depth: 0

- name: Get Changed Clusters
id: changed-clusters
uses: tj-actions/changed-files@v45
with:
files: kubernetes/**
dir_names: true
dir_names_max_depth: 2
matrix: true
# - name: Get Changed Clusters
# id: changed-clusters
# uses: tj-actions/changed-files@v45
# with:
# files: kubernetes/**
# dir_names: true
# dir_names_max_depth: 2
# matrix: true

- name: List All Changed Clusters
run: echo "${{ steps.changed-clusters.outputs.all_changed_and_modified_files }}"
# - name: List All Changed Clusters
# run: echo "${{ steps.changed-clusters.outputs.all_changed_and_modified_files }}"

flux-diff:
name: Flux Diff
runs-on: ubuntu-latest
needs: ["changed-clusters"]
#needs: ["changed-clusters"]
permissions:
contents: read
pull-requests: write
strategy:
matrix:
#paths: ${{ fromJSON(needs.changed-clusters.outputs.matrix) }}
paths: ["kubernetes"]
#paths: ${{ fromJSON(needs.changed-clusters.outputs.matrix) }}
resources: ["helmrelease", "kustomization"]
max-parallel: 4
fail-fast: false
Expand All @@ -64,11 +65,11 @@ jobs:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@v4
with:
token: "${{ steps.app-token.outputs.token }}"
path: pull
# - name: Checkout
# uses: actions/checkout@v4
# with:
# token: "${{ steps.app-token.outputs.token }}"
# path: pull

- name: Checkout Default Branch
uses: actions/checkout@v4
Expand All @@ -80,15 +81,6 @@ jobs:
- name: Print "matrix.paths"
run: echo ${{ matrix.paths }}

- name: Print "matrix.paths2"
run: echo ${{ fromJSON(needs.changed-clusters.outputs.matrix) }}

- name: Print "matrix.resources"
run: echo ${{ matrix.resources }}
# --path /github/workspace/pull/${{ matrix.paths }}/flux < use this if using matrix: true
# --path-orig /github/workspace/default/${{ matrix.paths }}/flux < use this if using matrix: true
# --path-orig /github/workspace/default/kubernetes/flux
# --path /github/workspace/pull/kubernetes/flux
- name: Diff Resources
uses: docker://ghcr.io/allenporter/flux-local:v6.0.1
with:
Expand Down

0 comments on commit 73e8f2e

Please sign in to comment.