granting data_portal schema read_only access (#243) #5
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
| # Builds Docker images and pushes to GHCR. Cloud Run pulls directly from GHCR. | |
| # The deploy-staging workflow triggers via workflow_run after this completes. | |
| name: Build and Push Docker Images | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "deployment/**" | |
| - "resources/docker/**" | |
| - "src/**" | |
| - "pixi.toml" | |
| - "pixi.lock" | |
| - ".github/workflows/docker-build.yml" | |
| release: | |
| types: [published] | |
| pull_request: | |
| paths: | |
| - "deployment/**" | |
| - "resources/docker/**" | |
| - "src/**" | |
| - "pixi.toml" | |
| - "pixi.lock" | |
| - ".github/workflows/docker-build.yml" | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_BASE: ghcr.io/${{ github.repository }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - dockerfile: resources/docker/pipeline.dockerfile | |
| image_name: pipeline | |
| - dockerfile: resources/docker/webservice.dockerfile | |
| image_name: webservice | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: docker/setup-buildx-action@v4 | |
| - name: Log in to GHCR | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate image metadata | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.IMAGE_BASE }}/${{ matrix.image_name }} | |
| tags: | | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=sha,prefix= | |
| type=ref,event=branch | |
| type=semver,pattern=v{{version}} | |
| - name: Build and push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ${{ matrix.dockerfile }} | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| platforms: linux/amd64 |