From d5c7e88a35704b6f3b66d02e5c49b65aa58b7b17 Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Fri, 1 Apr 2022 11:03:57 +0200 Subject: [PATCH] fix(ci): reshuffle when certain things are called and fix local syntaxis error --- .github/actions/collect-changes/action.yaml | 4 +- .github/workflows/charts-release.yaml | 50 ++++++++++----------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/.github/actions/collect-changes/action.yaml b/.github/actions/collect-changes/action.yaml index c293f0119b1..0db4877c510 100644 --- a/.github/actions/collect-changes/action.yaml +++ b/.github/actions/collect-changes/action.yaml @@ -54,16 +54,14 @@ runs: id: filter-bumped-charts shell: bash run: | - local repo_root repo_root=$(git rev-parse --show-toplevel) pushd "$repo_root" > /dev/null echo 'Looking up latest tag...' - local latest_tag latest_tag=$(lookup_latest_tag) echo "Discovering changed charts since '$latest_tag'..." - local changed_charts=() + changed_charts=() readarray -t changed_charts <<< "$(lookup_changed_charts "$latest_tag")" if [ ${#changed_charts[@]} -eq 0 ]; then diff --git a/.github/workflows/charts-release.yaml b/.github/workflows/charts-release.yaml index 89c4e33d2cf..2859b8004e9 100644 --- a/.github/workflows/charts-release.yaml +++ b/.github/workflows/charts-release.yaml @@ -17,28 +17,6 @@ jobs: image: ghcr.io/truecharts/devcontainer:v2.2.1@sha256:4ace13c049bf00f85c63e0070f86b71656a7c3b2113aa3e21c3107f3d1f7bf87 concurrency: gitpush steps: - - name: Checkout - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3 - with: - token: ${{ secrets.BOT_TOKEN }} - fetch-depth: 0 - - - name: Checkout - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3 - with: - fetch-depth: 1 - repository: truecharts/catalog - token: ${{ secrets.BOT_TOKEN }} - path: catalog - - - name: Checkout - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3 - with: - fetch-depth: 1 - repository: truecharts/dh_catalog - token: ${{ secrets.BOT_TOKEN }} - path: dh_catalog - - name: Install Kubernetes tools uses: yokawasa/action-setup-kube-tools@c81bf94cddd6c3172e6f61aa7f5ad66a2b5db98d # tag=v0.8.0 with: @@ -51,14 +29,20 @@ jobs: wget -O /tmp/helm-docs.deb https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.deb sudo dpkg -i /tmp/helm-docs.deb - - name: Generate README for changed charts - run: | - .github/scripts/gen-docs.sh + - name: Checkout + uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3 + with: + token: ${{ secrets.BOT_TOKEN }} + fetch-depth: 0 - name: Collect changes id: collect-changes uses: ./.github/actions/collect-changes + - name: Generate README for changed charts + run: | + .github/scripts/gen-docs.sh + - name: Checkout uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3 with: @@ -93,6 +77,22 @@ jobs: fi done + - name: Checkout + uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3 + with: + fetch-depth: 1 + repository: truecharts/catalog + token: ${{ secrets.BOT_TOKEN }} + path: catalog + + - name: Checkout + uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3 + with: + fetch-depth: 1 + repository: truecharts/dh_catalog + token: ${{ secrets.BOT_TOKEN }} + path: dh_catalog + - name: build catalogs if: | steps.collect-changes.outputs.changesDetectedAfterTag == 'true'