1
0
Fork 0
mirror of https://github.com/imjasonh/kontain.me synced 2026-07-14 12:48:07 +00:00
kontain.me/.github/workflows/deploy.yaml
Jason Hall 22db212ec7
on second thought, let's not use graphviz; 'tis a silly place
Signed-off-by: Jason Hall <jason@chainguard.dev>
2023-04-27 21:33:21 -04:00

49 lines
1.2 KiB
YAML

name: Deploy
on:
schedule:
- cron: '0 1 * * *' # 1AM UTC; 9PM Eastern
push:
branches: ['main']
workflow_dispatch:
jobs:
deploy:
name: Deploy
runs-on: ['ubuntu-latest']
permissions:
id-token: write
contents: read
env:
KO_DOCKER_REPO: gcr.io/kontaindotme
TF_VAR_domain: kontain.me
TF_VAR_project_id: kontaindotme
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: '1.20.x'
- uses: hashicorp/setup-terraform@v2
- uses: imjasonh/setup-crane@v0.1
# Setup OIDC->SA auth
- uses: google-github-actions/auth@v0
id: auth
with:
workload_identity_provider: 'projects/7577580991/locations/global/workloadIdentityPools/gha-pool/providers/gha-provider'
service_account: 'gha-deployer@kontaindotme.iam.gserviceaccount.com'
- uses: google-github-actions/setup-gcloud@v0.6.0
with:
project_id: kontaindotme
- name: Terraform Plan
run: |
terraform init
terraform plan -input=false -lock=false -out=plan.tmp
- name: Terraform Apply
run: terraform apply -auto-approve -input=false plan.tmp
- run: ./test.sh