1
0
Fork 0
mirror of https://github.com/imjasonh/kontain.me synced 2026-07-07 00:32:28 +00:00
kontain.me/.github/workflows/deploy.yaml
Jason Hall 29b97f8dd9 update deps
Signed-off-by: Jason Hall <imjasonh@gmail.com>
2026-05-12 09:09:26 -04:00

43 lines
1.4 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: stable
- uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
- uses: imjasonh/setup-crane@6da1ae018866400525525ce74ff892880c099987 # v0.5
# Setup OIDC->SA auth
- uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
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@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
with:
project_id: kontaindotme
- name: Terraform Plan and Apply
run: |
terraform init
terraform plan -input=false -lock=false -out=plan.tmp
terraform apply -auto-approve -input=false plan.tmp