Skip to content

[Refactor] br_me_cnpj #4100

[Refactor] br_me_cnpj

[Refactor] br_me_cnpj #4100

Workflow file for this run

---
name: Build Docker image
on:
push:
branches: [main]
paths:
- .github/workflows/cd.yaml
- pipelines/**/*
- pyproject.toml
- Dockerfile
pull_request:
branches: [main]
paths:
- .github/workflows/cd_staging.yaml
- pipelines/**/*
- pyproject.toml
- Dockerfile
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
GH_PAT: ${{ secrets.GH_PAT }}
IMAGE_NAME: ghcr.io/basedosdados/prefect-flows
jobs:
build-container:
name: Build Docker image
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Google Cloud CLI
uses: google-github-actions/[email protected]
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
export_default_credentials: true
- name: Build and publish Prefect Agent image
run: |-
docker build -t $IMAGE_NAME:$GITHUB_SHA .
docker build -t $IMAGE_NAME:latest .
echo $GH_PAT | docker login ghcr.io -u gabriel-milan --password-stdin
docker push $IMAGE_NAME:$GITHUB_SHA
docker push $IMAGE_NAME:latest