Skip to content

Commit

Permalink
feat: config deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfg committed Mar 30, 2024
1 parent d210b26 commit db387b0
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/prefect-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
name: Build an Image and Deploy a Prefect flow
on: workflow_dispatch
on:
push:
branches:
- main
jobs:
deploy_flow:
permissions:
# required to obtain Google Cloud service account credentials
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout Repo
uses: actions/checkout@v3

- uses: google-github-actions/auth@v1
- name: Setup Python
uses: actions/setup-python@v4
with:
workload_identity_provider: projects/<project_id>/locations/global/workloadIdentityPools/<pool-name>/providers/<provider-name>
service_account: <gcp_service_account>@<project_id>.iam.gserviceaccount.com

- name: Configure Google Cloud credential helper
run: gcloud auth configure-docker --quiet us-east1-docker.pkg.dev
python-version: '3.10'

- uses: actions/setup-python@v4
- name: Login to GAR
uses: docker/login-action@v3
with:
python-version: '3.10'
registry: us-east1-docker.pkg.dev
username: _json_key
password: ${{ secrets.GAR_JSON_KEY }}

- name: Prefect Auth
uses: PrefectHQ/actions-prefect-auth@v1
Expand All @@ -30,6 +31,6 @@ jobs:
- name: Run Prefect Deploy
uses: PrefectHQ/actions-prefect-deploy@v3
with:
deployment-names: Docker
requirements-file-paths: ./examples/docker/requirements.txt
deployment-file-path: ./examples/docker/prefect.yaml
all-deployments: true
pyproject-toml-path: ./pyproject.toml
deployment-file-path: ./prefect.yaml

0 comments on commit db387b0

Please sign in to comment.