From 2e4069a728d18d0c02a6b2640d52566f615b0646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=E1=B4=87=CA=80=C9=B4=E1=B4=85=20S=E1=B4=84=CA=9C?= =?UTF-8?q?=E1=B4=8F=CA=80=C9=A2=E1=B4=87=CA=80s?= Date: Wed, 27 Jul 2022 11:17:39 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=A7=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/charts-release.yaml | 73 ++++++++++----------------- 1 file changed, 28 insertions(+), 45 deletions(-) diff --git a/.github/workflows/charts-release.yaml b/.github/workflows/charts-release.yaml index aa15240b..114cfbc5 100644 --- a/.github/workflows/charts-release.yaml +++ b/.github/workflows/charts-release.yaml @@ -11,18 +11,22 @@ on: - "charts/**" jobs: - collect-changes: + release-charts: runs-on: ubuntu-22.04 - - outputs: - changesDetected: ${{ steps.filter.outputs.chartsAddedOrModified }} - addedOrModifiedCharts: ${{ steps.filter-charts.outputs.addedOrModifiedCharts }} - steps: - - name: Checkout + - name: Get k8s-at-home token + id: get-app-token + uses: getsentry/action-github-app-token@v1 + with: + app_id: ${{ secrets.BJWS_APP_ID }} + private_key: ${{ secrets.BJWS_APP_PRIVATE_KEY }} + + - name: Checkout charts branch uses: actions/checkout@v3 with: token: ${{ steps.get-app-token.outputs.token }} + path: 'src' + fetch-depth: 0 - name: Collect changes uses: dorny/paths-filter@v2 @@ -31,7 +35,7 @@ jobs: list-files: shell filters: | chartsAddedOrModified: - - added|modified: 'charts/*/**' + - added|modified: 'src/charts/*/**' - name: Collect changed charts if: | @@ -52,27 +56,6 @@ jobs: # Set output to changed charts printf "::set-output name=addedOrModifiedCharts::%s\n" "${CHARTS[*]}" - release-charts: - runs-on: ubuntu-22.04 - needs: - - collect-changes - if: - needs.collect-changes.outputs.changesDetected == 'true' - steps: - - name: Get k8s-at-home token - id: get-app-token - uses: getsentry/action-github-app-token@v1 - with: - app_id: ${{ secrets.BJWS_APP_ID }} - private_key: ${{ secrets.BJWS_APP_PRIVATE_KEY }} - - - name: Checkout charts branch - uses: actions/checkout@v3 - with: - token: ${{ steps.get-app-token.outputs.token }} - path: 'src' - fetch-depth: 0 - - name: Checkout gh-pages branch uses: actions/checkout@v3 with: @@ -89,7 +72,7 @@ jobs: env: SRC_DIR: "src/charts" DEST_DIR: "dest" - CHARTS: "${{ needs.collect-changes.outputs.addedOrModifiedCharts }}" + CHARTS: "${{ steps.filter-charts.outputs.addedOrModifiedCharts }}" run: | for CHART in $CHARTS ; do mapfile -t CHART_PATH_PARTS < <(echo "$CHART" | tr '/' '\n') @@ -99,19 +82,19 @@ jobs: helm package "$CHART" -u -d "$DEST_DIR/$CHART_TYPE" done - - name: Create new index - shell: bash - working-directory: dest - run: | - helm repo index . --url https://bjw-s.github.io/helm-charts/ + # - name: Create new index + # shell: bash + # working-directory: dest + # run: | + # helm repo index . --url https://bjw-s.github.io/helm-charts/ - - name: Push changes - shell: bash - working-directory: dest - run: | - git config user.name "bjw-s-bot[bot]" - git config user.email "bjw-s-bot <87358111+bjw-s-bot[bot]@users.noreply.github.com>" - git add $(git ls-files -o --exclude-standard) - git add index.yaml - git commit -m "Updated from ref: $GITHUB_SHA" - git push + # - name: Push changes + # shell: bash + # working-directory: dest + # run: | + # git config user.name "bjw-s-bot[bot]" + # git config user.email "bjw-s-bot <87358111+bjw-s-bot[bot]@users.noreply.github.com>" + # git add $(git ls-files -o --exclude-standard) + # git add index.yaml + # git commit -m "Updated from ref: $GITHUB_SHA" + # git push