Add static pipelines to uploader #45
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
| # This workflow deploys the repository to run daily on google cloud run | |
| name: Deploy | |
| on: | |
| push: | |
| branches: develop | |
| jobs: | |
| main: | |
| runs-on: ubuntu-latest | |
| environment: deployment | |
| permissions: | |
| contents: 'read' | |
| id-token: 'write' | |
| steps: | |
| - id: auth | |
| name: Google Cloud Auth | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| token_format: access_token | |
| workload_identity_provider: projects/762526944259/locations/global/workloadIdentityPools/pool/providers/github-deploy | |
| service_account: '[email protected]' | |
| - name: Set up Google Cloud | |
| uses: google-github-actions/setup-gcloud@v2 | |
| - name: Login to Artifact Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: us-central1-docker.pkg.dev | |
| username: oauth2accesstoken | |
| password: ${{ steps.auth.outputs.access_token }} | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| tags: us-central1-docker.pkg.dev/api-tools-451421/runners/daily-update-events | |
| - name: Upload to dev job | |
| uses: google-github-actions/deploy-cloudrun@v2 | |
| with: | |
| job: 'daily-update-events-dev' | |
| image: 'us-central1-docker.pkg.dev/api-tools-451421/runners/daily-update-events' | |
| region: us-central1 | |
| - name: Upload to prod job | |
| uses: google-github-actions/deploy-cloudrun@v2 | |
| with: | |
| job: 'daily-update-events-prod' | |
| image: 'us-central1-docker.pkg.dev/api-tools-451421/runners/daily-update-events' | |
| region: us-central1 |