update workflows to use submodule actions and clone submodules recursively
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
diff --git a/.github/workflows/chart-rebuild.yaml b/.github/workflows/chart-rebuild.yaml
index 9edb835..7cff622 100644
--- a/.github/workflows/chart-rebuild.yaml
+++ b/.github/workflows/chart-rebuild.yaml
@@ -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 @@
- name: Checkout
uses: actions/checkout@v2
with:
+ persist-credentials: false
ref: 'gh-pages'
fetch-depth: 0
@@ -19,7 +21,7 @@
- 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
diff --git a/.github/workflows/chart-releaser.yaml b/.github/workflows/chart-releaser.yaml
index 5fcef0c..07a8f70 100644
--- a/.github/workflows/chart-releaser.yaml
+++ b/.github/workflows/chart-releaser.yaml
@@ -13,6 +13,8 @@
uses: actions/checkout@v2
with:
fetch-depth: 0
+ persist-credentials: false
+ submodules: recursive
- name: Configure Git
run: |
@@ -25,7 +27,7 @@
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
diff --git a/.github/workflows/chart-test.yaml b/.github/workflows/chart-test.yaml
index b5156d5..248facb 100644
--- a/.github/workflows/chart-test.yaml
+++ b/.github/workflows/chart-test.yaml
@@ -14,6 +14,8 @@
uses: actions/checkout@v2
with:
fetch-depth: 0
+ persist-credentials: false
+ submodules: recursive
- name: Set up Helm
uses: azure/setup-helm@v1
@@ -21,7 +23,7 @@
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,6 +48,8 @@
uses: actions/checkout@v2
with:
fetch-depth: 0
+ persist-credentials: false
+ submodules: recursive
- name: Set up Helm
uses: azure/setup-helm@v1
@@ -53,7 +57,7 @@
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 @@
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