fix(foundry-vtt): deployment wasn't adding a volume for data if s3 was disabled #106
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint, Test and Deploy Charts | |
on: | |
push: | |
paths: | |
- charts/** | |
- .github/workflows/** | |
pull_request_target: | |
paths: | |
- charts/** | |
- .github/workflows/** | |
jobs: | |
lint-charts: | |
name: Lint Charts | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: "Checkout" | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: "Set Up Helm" | |
uses: azure/[email protected] | |
if: github.ref != 'refs/heads/main' | |
with: | |
version: v3.4.1 | |
- name: "Set Up Python" | |
uses: actions/[email protected] | |
if: github.ref != 'refs/heads/main' | |
with: | |
python-version: 3.9 | |
- name: "Set up chart-testing" | |
uses: helm/[email protected] | |
if: github.ref != 'refs/heads/main' | |
with: | |
version: v3.3.0 | |
- name: "Run chart-testing (list-changed)" | |
id: list-changed | |
if: github.ref != 'refs/heads/main' | |
run: | | |
changed=$(ct list-changed --config .github/ct/ct.yaml) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
echo "changed-list=$changed" >> $GITHUB_OUTPUT | |
fi | |
- name: "Save Testing Values from Secret" | |
shell: bash | |
env: | |
SECRET_VALUES: ${{ secrets.FOUNDRY_SECRET_VALUES }} | |
run: echo "$SECRET_VALUES" | base64 -d > ./charts/foundry-vtt/ci/test-values.yaml | |
if: github.ref != 'refs/heads/main' && contains(steps.list-changed.outputs.changed-list, 'charts/foundry-vtt') | |
- name: "Run chart-testing (lint)" | |
run: ct lint --config .github/ct/ct.yaml --lint-conf .github/ct/lintconf.yaml --chart-yaml-schema .github/ct/chart_schema.yaml | |
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/main' | |
install-charts: | |
name: Install Charts | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: "Checkout" | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: "Set Up Helm" | |
uses: azure/[email protected] | |
if: github.ref != 'refs/heads/main' | |
with: | |
version: v3.4.1 | |
- name: "Set Up Python" | |
uses: actions/[email protected] | |
if: github.ref != 'refs/heads/main' | |
with: | |
python-version: 3.9 | |
- name: "Set up chart-testing" | |
uses: helm/[email protected] | |
if: github.ref != 'refs/heads/main' | |
with: | |
version: v3.3.0 | |
- name: "Run chart-testing (list-changed)" | |
id: list-changed | |
if: github.ref != 'refs/heads/main' | |
run: | | |
changed=$(ct list-changed --config .github/ct/ct.yaml) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
echo "changed-list=$changed" >> $GITHUB_OUTPUT | |
fi | |
- name: "Save Testing Values from Secret" | |
shell: bash | |
env: | |
SECRET_VALUES: ${{ secrets.FOUNDRY_SECRET_VALUES }} | |
run: echo "$SECRET_VALUES" | base64 -d > ./charts/foundry-vtt/ci/test-values.yaml | |
if: github.ref != 'refs/heads/main' && contains(steps.list-changed.outputs.changed-list, 'charts/foundry-vtt') | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/main' | |
- name: Run chart-testing (install) | |
run: ct install --config .github/ct/ct.yaml --debug | |
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/main' | |
release-on-github-pages: | |
name: Release Chart on GitHub Pages | |
runs-on: ubuntu-22.04 | |
needs: | |
- lint-charts | |
- install-charts | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodule: recursive | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Run chart-releaser | |
uses: helm/[email protected] | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: 'latest' | |
- name: Build Hugo | |
run: | | |
git submodule init | |
git submodule update | |
cd hugo | |
hugo --minify | |
cp -r ./public ../public | |
cd .. | |
- name: Deploy Hugo | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
cname: helm.mahahe.it | |
keep_files: true |