Skip to content
Permalink
Browse files
update workflows to use submodule actions and clone submodules recurs…
…ively

Also set persist-credentials: false universally. This could cause problems for the releaser and rebuild actions if they take advantage of the default persist-credentials: true. Also note that rebuild does not clone recursively because it does not use submodules
  • Loading branch information
colearendt committed Jun 18, 2022
1 parent 24316e4 commit 7358f174908243742c1e850f5dfa19e44e0583e8
Showing 3 changed files with 13 additions and 9 deletions.
@@ -1,3 +1,4 @@
# Will be superseded by https://github.com/helm/chart-releaser/issues/133
name: Rebuild index.yaml manually
on:
workflow_dispatch:
@@ -9,6 +10,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
ref: 'gh-pages'
fetch-depth: 0

@@ -19,7 +21,7 @@ jobs:

- name: Rebuild index.yaml
env:
version: v1.4.0
version: v1.5.0
run: |
if [[ ! -d "$RUNNER_TOOL_CACHE" ]]; then
echo "Cache directory '$RUNNER_TOOL_CACHE' does not exist" >&2
@@ -13,6 +13,8 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
submodules: recursive

- name: Configure Git
run: |
@@ -25,7 +27,7 @@ jobs:
version: v3.6.3

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.4.0
uses: ./.github/actions/chart-releaser-action
with:
charts_dir: .
charts_repo_url: https://apache.github.io/couchdb-helm
@@ -14,14 +14,16 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
submodules: recursive

- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.6.3

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
uses: ./.github/actions/chart-testing-action

- name: Run chart-testing (list-changed)
id: list-changed
@@ -46,14 +48,16 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
submodules: recursive

- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.6.3

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.1
uses: ./.github/actions/chart-testing-action

- name: Run chart-testing (list-changed)
id: list-changed
@@ -64,17 +68,13 @@ jobs:
fi
- name: Create kind cluster
uses: helm/kind-action@v1.2.0
uses: ./.github/actions/kind-action
if: ( steps.list-changed.outputs.changed == 'true' ) || ${{ github.ref == 'refs/heads/main' }}

# no allow-failure until https://github.com/actions/toolkit/issues/399
- name: Run chart-testing (install changed)
if: ${{ github.ref != 'refs/heads/main' }}
run: ct install --target-branch main --chart-dirs --upgrade .
continue-on-error: true

# no allow-failure until https://github.com/actions/toolkit/issues/399
- name: Run chart-testing (install all)
if: ${{ github.ref == 'refs/heads/main' }}
run: ct install --target-branch main --all --chart-dirs --upgrade .
continue-on-error: true

0 comments on commit 7358f17

Please sign in to comment.