Skip to content

Deploy

Deploy #28

name: Deploy
on:
workflow_dispatch:
inputs:
stage:
description: "deployment stage"
required: true
type: choice
default: staging
options:
- staging
- production
version:
description: "image version to deploy"
required: true
type: string
default: latest
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./scripts/resolve-version.sh ${{ github.event.inputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: google-github-actions/auth@v1
with:
project_id: go-semantic-release
credentials_json: ${{ secrets.GCLOUD_AUTH }}
- uses: google-github-actions/deploy-cloudrun@v1
with:
region: europe-west1
service: ${{ github.event.inputs.stage }}-plugin-registry
image: gcr.io/go-semantic-release/plugin-registry:${{ env.VERSION }}