Round to 3 decimal places #33
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 & Push | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- '.github/workflows/**' | |
- 'Dockerfile' | |
- 'data/**' | |
- 'images/**' | |
- 'src/**' | |
- 'subpages/**' | |
- 'app.py' | |
- 'requirements.txt' | |
env: | |
IMAGE_NAME: lake-liming | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v3 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: europe-west1-docker.pkg.dev/niva-cd/images/${{ env.IMAGE_NAME }} | |
tags: | | |
type=sha,prefix= | |
type=raw,value=latest | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- id: "auth" | |
name: "Authenticate to Google Cloud" | |
uses: "google-github-actions/auth@v1" | |
with: | |
token_format: access_token | |
workload_identity_provider: "${{ secrets.POOL }}" | |
service_account: "${{ secrets.SA }}" | |
- name: Login to Artifact Registry | |
uses: "docker/login-action@v2" | |
with: | |
registry: "europe-west1-docker.pkg.dev" | |
username: "oauth2accesstoken" | |
password: "${{ steps.auth.outputs.access_token }}" | |
- id: docker_push | |
name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
context: . | |
tags: ${{ steps.meta.outputs.tags }} |