mirror of
https://github.com/imjasonh/kontain.me
synced 2026-07-08 09:04:54 +00:00
41 lines
952 B
YAML
41 lines
952 B
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
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
# Install tools.
|
|
- uses: imjasonh/setup-ko@v0.4
|
|
env:
|
|
KO_DOCKER_REPO: gcr.io/kontaindotme
|
|
- 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
|
|
|
|
# Deploy and test.
|
|
- run: ./deploy.sh
|
|
env:
|
|
KOCACHE: ~/ko
|
|
- run: ./test.sh
|
|
|