Skip to content

Separate game and rcon service annotations #75

Separate game and rcon service annotations

Separate game and rcon service annotations #75

name: Lint, Test and Deploy Charts
on:
push:
pull_request:
jobs:
lint-test:
name: "Lint and Test"
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 ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: "Run chart-testing (lint)"
run: ct lint --config ct.yaml
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/main'
- 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 ct.yaml
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/main'
release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs:
- lint-test
name: "Release Chart on GH"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: '${{ secrets.CR_TOKEN }}'