1
0
Fork 0
mirror of https://github.com/imjasonh/kontain.me synced 2026-07-08 17:15:12 +00:00
kontain.me/.github/workflows/deploy.yaml
dependabot[bot] e06d52093d
Bump google-github-actions/auth from 0.4.1 to 0.4.2
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.4.1...v0.4.2)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-09 18:13:50 +00:00

58 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
steps:
# Install tools.
- uses: actions/setup-go@v2
with:
go-version: 1.17.x
- uses: imjasonh/setup-ko@v0.4
env:
KO_DOCKER_REPO: gcr.io/kontaindotme
with:
version: tip
- uses: imjasonh/setup-crane@v0.1
- uses: google-github-actions/setup-gcloud@v0.3.0
with:
project_id: kontaindotme
# Setup OIDC->SA auth
- uses: google-github-actions/auth@v0.4.2
id: auth
with:
workload_identity_provider: 'projects/7577580991/locations/global/workloadIdentityPools/gha-pool/providers/gha-provider'
service_account: 'gha-deployer@kontaindotme.iam.gserviceaccount.com'
create_credentials_file: true
- run: gcloud auth configure-docker
# Checkout code.
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/ko
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# Deploy and test.
- run: ./deploy.sh
env:
KOCACHE: ~/ko
- run: ./test.sh