add: avaliacao bimestral 2024 #6509
This file contains 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: Build Docker image | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- ".github/workflows/cd.yaml" | |
- "pipelines/**/*" | |
- "pyproject.toml" | |
- "Dockerfile" | |
pull_request: | |
branches: | |
- master | |
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/prefeitura-rio/prefect-flows | |
jobs: | |
build-container: | |
name: Build Docker image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- 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 |