Skip to content

Commit

Permalink
.github: workflow for data-plane-controller (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraettinger committed Nov 5, 2024
1 parent dfe28b9 commit 85a9346
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/data-plane-controller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Deploy data-plane-controller

on:
workflow_dispatch:
inputs:
environment:
description: "Environment to deploy to (e.g., staging or production)"
required: true
default: "staging"
push:
branches: [johnny/dpc-cd]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
lfs: true

- uses: supabase/setup-cli@v1
with:
version: latest

- run: supabase start

- uses: Swatinem/rust-cache@v2

- name: Build `data-plane-controller`
run: cargo build --release -p data-plane-controller

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: rust-binaries
path: |
./target/release/data-plane-controller
deploy-artifacts:
runs-on: ubuntu-24.04
needs: build
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
lfs: true

- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: rust-binaries

- name: Authenticate with GCP Workload Identity Federation
uses: google-github-actions/auth@v2
with:
service_account: [email protected]
workload_identity_provider: projects/671073686895/locations/global/workloadIdentityPools/github/providers/github

- name: Deploy to environment
run: |
echo "Deploying artifacts to environment: ${{ github.event.inputs.environment }}"
echo "Deployment process is ongoing..."
echo "Deployment completed successfully."

0 comments on commit 85a9346

Please sign in to comment.