Skip to content

Add Google Cloud Run deploy #6

Add Google Cloud Run deploy

Add Google Cloud Run deploy #6

Workflow file for this run

name: Deploy staging server
on:
workflow_dispatch:
# workflow_run:
pull_request:
branches:
- uplift
- uplift-deploy
- main
permissions:
id-token: write
contents: read # This is required for actions/checkout
jobs:
node:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
# secrets.wip_number defined as secret
- id: gcp-auth
uses: google-github-actions/auth@v2
with:
token_format: 'access_token'
service_account: deploy-stage@moz-fx-ttreporter-nonprod-c233.iam.gserviceaccount.com
workload_identity_provider: projects/${{ secrets.wip_number }}/locations/global/workloadIdentityPools/github-actions/providers/github-actions
- id: 'gcloud'
name: 'gcloud'
run: |-
gcloud auth login --brief --cred-file="${{ steps.auth.outputs.credentials_file_path }}"
gcloud services list
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Build and push
# id: docker_node
# uses: docker/build-push-action@v5
# with:
# push: true
# file: Dockerfile
# cache-from: type=gha
# cache-to: type=gha,mode=max
# build-args: ${{ env.DOCKER_BUILD_ARGS }}
# tags: |
# tt-reporter-node:staging-${{ github.sha }}
# tt-reporter-node:staging
deploy:
# environment:
# name: Staging
# url: "https://tt-reporter.uplift.ltd"
runs-on: ubuntu-latest
needs:
- node
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy
run: |
echo "TODO"