Create Valkey with GitHub Actions ΒΆ
Prerequisites ΒΆ
- You're part of a Nais team
- Your repository is authorized for your Nais team in Console
Create the manifest ΒΆ
Create .nais/valkey.yaml:
version: v1
type: Valkey
name: myvalkey
spec:
memory: 1GB
tier: HighAvailabilityChange the name and configuration for your needs. See the complete generated example and Valkey manifest reference.
Create the workflow ΒΆ
Create .github/workflows/deploy-valkey.yaml:
name: Deploy Valkey
on:
push:
branches:
- main
paths:
- .nais/valkey.yaml
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up the Nais CLI
uses: nais/setup@v1
- name: Apply Valkey manifest
run: nais apply .nais/valkey.yaml --team <MY-TEAM> --environment <MY-ENV>Replace <MY-TEAM> with your Nais team and <MY-ENV> with a GCP environment available to your tenant, such as dev-gcp or prod-gcp for NAV.
The example uses major action tags for readability. Pin actions to full commit SHAs in production, and use Dependabot to keep them updated. See GitHub's secure use reference .
Commit and push both files to main. The push trigger runs when the manifest changes. If you only change the workflow, run it manually from the Actions tab in GitHub.
A manual run applies the manifest from the selected Git ref, regardless of the paths filter.