Skip to content

Clean up deployment / auto-deploy, update README and clean up PORT #1

Clean up deployment / auto-deploy, update README and clean up PORT

Clean up deployment / auto-deploy, update README and clean up PORT #1

Workflow file for this run

name: Build and Deploy to Google Cloud Run
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23.x'
- name: Install ko
uses: ko-build/setup-ko@v0.7
env:
KO_DOCKER_REPO: us-central1-docker.pkg.dev/minder-zoo/banditize
- uses: google-github-actions/auth@v2
with:
workload_identity_provider: projects/2476835098/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions
project_id: minder-zoo
# Build and push the application
- name: Build application
id: build
run: echo "::set-output name=image::$(ko build)"
env:
KO_DEFAULTBASEIMAGE: ghcr.io/pycqa/bandit/bandit@sha256:82b81adc7ac8394e35da72fd34eb56a5d56f8a32bfec7bf1b8ad9188a840ac89
# Publish the container to Google Artifact Registry
- name: Push to Google Cloud Run
uses: google-github-actions/deploy-cloudrun@v2
with:
image: "${{ steps.build.outputs.image}}"
service: banditize
region: us-central1