Last active
May 18, 2021 16:27
-
-
Save grant/030c83eabe8211cb54abb2d32bacf348 to your computer and use it in GitHub Desktop.
A GitHub Workflow that deploys a Cloud Workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Cloud Workflow | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Deploy Cloud Workflow | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@master | |
with: | |
project_id: ${{ secrets.GCP_PROJECT_ID }} | |
service_account_key: ${{ secrets.GCP_SA_KEY }} | |
export_default_credentials: true | |
- name: Use gcloud CLI | |
run: | | |
gcloud workflows deploy myWorkflowFromGitHub \ | |
--location us-central1 \ | |
--source myFirstWorkflow.workflows.yaml \ | |
--project ${{ secrets.GCP_PROJECT_ID }} \ | |
--labels "commit-sha=${{ github.sha }}" \ | |
--service-account my-wf-service-account@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment