Skip to content

Move AssertHealthy to testsupport #16

Move AssertHealthy to testsupport

Move AssertHealthy to testsupport #16

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Run tests
run: go test -race ./...
build:
runs-on: ubuntu-latest
needs: [ test ]
permissions:
contents: "read"
id-token: "write"
steps:
- uses: actions/checkout@v3
- uses: google-github-actions/setup-gcloud@v1
- uses: google-github-actions/auth@v1
with:
workload_identity_provider: "${{ vars.GCP_WORKLOAD_IDENTITY_POOL_ID }}"
service_account: "${{ vars.GCP_SERVICE_ACCOUNT }}"
- name: 'Build'
shell: bash
run: |
gcloud builds submit --pack image=gcr.io/${{ vars.GCP_PROJECT_ID }}/streaming-html/app:${{ github.sha }},builder=gcr.io/buildpacks/builder:google-22,env=GOOGLE_BUILDABLE=cmd/app/app.go
deploy:
runs-on: ubuntu-latest
needs: [ build ]
permissions:
contents: "read"
id-token: "write"
steps:
- uses: actions/checkout@v3
- uses: google-github-actions/setup-gcloud@v1
- uses: google-github-actions/auth@v1
with:
workload_identity_provider: "${{ vars.GCP_WORKLOAD_IDENTITY_POOL_ID }}"
service_account: "${{ vars.GCP_SERVICE_ACCOUNT }}"
- name: deploy
run: |-
gcloud run deploy streaming-html-app \
--image gcr.io/${{ vars.GCP_PROJECT_ID }}/streaming-html/app:${{ github.sha }} \
--region us-central1 \
--allow-unauthenticated \
--platform managed