Update appVersion to 98adb0ff (#101) #328
This file contains hidden or 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: Test Chart | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v4 | |
with: | |
version: latest | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
check-latest: true | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Chart linting | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct lint --config ci/ct.yaml | |
- name: Set up GCP auth | |
id: auth | |
if: steps.list-changed.outputs.changed == 'true' | |
uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} | |
service_account: ${{ secrets.SERVICE_ACCOUNT }} | |
token_format: 'access_token' | |
access_token_lifetime: 600s | |
- name: Generate pull secret | |
if: steps.list-changed.outputs.changed == 'true' | |
env: | |
DOCKER_CONFIG: "." | |
REPOSITORY: "us-docker.pkg.dev" | |
run: | | |
echo "::add-mask::${{ steps.auth.outputs.access_token }}" | |
cat <<EOF >"${DOCKER_CONFIG}/config.json" | |
{ | |
"auths": { "${REPOSITORY}": {} } | |
} | |
EOF | |
echo "${{ steps.auth.outputs.access_token }}" | docker login -u oauth2accesstoken --password-stdin "${REPOSITORY}" | |
- name: Create Kind Cluster | |
if: steps.list-changed.outputs.changed == 'true' | |
uses: helm/kind-action@v1 | |
with: | |
config: 'ci/kind.yaml' | |
- name: Create k8s secrets | |
if: steps.list-changed.outputs.changed == 'true' | |
run: | | |
kubectl create secret generic pg-dsns \ | |
--from-literal="postgresDsn=postgres://postgres:postgres@logfire-postgres:5432/crud" \ | |
--from-literal="postgresFFDsn=postgres://postgres:postgres@logfire-postgres:5432/ff" \ | |
kubectl create secret generic logfire-tokens \ | |
--from-literal="logfire-dex-client-secret=$(date +%s%N | sha256sum | head -c 32)" \ | |
--from-literal="logfire-meta-write-token=$(date +%s%N | sha256sum | head -c 32)" \ | |
--from-literal="logfire-meta-frontend-token=$(date +%s%N | sha256sum | head -c 32)" \ | |
--from-literal="logfire-jwt-secret=$(date +%s%N | sha256sum | head -c 32)" | |
kubectl create secret generic logfire-admin \ | |
--from-literal="logfire-admin-password=$(date +%s%N | sha256sum | head -c 32)" \ | |
--from-literal="logfire-admin-totp-secret=$(head -c 20 /dev/urandom | base32 | tr -d '=' | head -c 32)" \ | |
--from-literal="logfire-admin-totp-recovery-codes=[\"$(date +%s%N | sha256sum | head -c 32)\"]" \ | |
--from-literal="logfire-jwt-secret=$(date +%s%N | sha256sum | head -c 32)" | |
- name: Run chart testing | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct install --upgrade --config ci/ct.yaml |