|
54 | 54 | firebase_config: ${{ secrets.FIREBASE_CONFIG }}
|
55 | 55 | build_command: npm run build -- --mode dev
|
56 | 56 |
|
57 |
| - deploy-python-dev: |
58 |
| - name: Deploy python to staging |
59 |
| - runs-on: ubuntu-latest |
60 |
| - if: github.ref == 'refs/heads/dev' |
61 |
| - environment: |
62 |
| - name: dev |
63 |
| - permissions: |
64 |
| - id-token: write |
65 |
| - contents: read |
66 |
| - |
67 |
| - steps: |
68 |
| - - name: ⬇️ Checkout code |
69 |
| - uses: actions/checkout@v4 |
70 |
| - with: |
71 |
| - show-progress: false |
72 |
| - |
73 |
| - - name: 🗝️ Authenticate to Google Cloud |
74 |
| - id: auth |
75 |
| - uses: google-github-actions/auth@v2 |
76 |
| - with: |
77 |
| - workload_identity_provider: ${{ secrets.IDENTITY_PROVIDER }} |
78 |
| - service_account: ${{ secrets.SERVICE_ACCOUNT_EMAIL }} |
79 |
| - token_format: 'access_token' |
80 |
| - |
81 |
| - - name: 🐳 Set up Docker Buildx |
82 |
| - id: builder |
83 |
| - uses: docker/setup-buildx-action@v3 |
84 |
| - |
85 |
| - - name: 🗝️ Authenticate Docker to Google Cloud |
86 |
| - uses: docker/login-action@v3 |
87 |
| - with: |
88 |
| - registry: us-central1-docker.pkg.dev |
89 |
| - username: oauth2accesstoken |
90 |
| - password: ${{ steps.auth.outputs.access_token }} |
91 |
| - |
92 |
| - - name: 🏷️ Extract tags from GitHub |
93 |
| - id: meta |
94 |
| - uses: docker/metadata-action@v5 |
95 |
| - with: |
96 |
| - github-token: ${{ secrets.GITHUB_TOKEN }} |
97 |
| - images: us-central1-docker.pkg.dev/${{ secrets.PROJECT_ID }}/images/job |
98 |
| - tags: | |
99 |
| - type=ref,suffix=-{{sha}},event=branch |
100 |
| - type=ref,prefix=pr-,suffix=-{{sha}},event=pr |
101 |
| - type=semver,pattern={{version}} |
102 |
| - latest |
103 |
| -
|
104 |
| - - name: 📦 Build and push image |
105 |
| - uses: docker/build-push-action@v6 |
106 |
| - with: |
107 |
| - builder: ${{ steps.builder.outputs.name }} |
108 |
| - tags: ${{ steps.meta.outputs.tags }} |
109 |
| - context: . |
110 |
| - file: ./Dockerfile |
111 |
| - push: true |
112 |
| - cache-from: type=gha |
113 |
| - cache-to: type=gha,mode=max |
114 |
| - provenance: false |
115 |
| - |
116 |
| - - name: ☁️ Set up Cloud SDK |
117 |
| - uses: google-github-actions/setup-gcloud@v2 |
118 |
| - |
119 |
| - - name: 🚀 Deploy to Cloud Run Job |
120 |
| - uses: google-github-actions/deploy-cloudrun@v2 |
121 |
| - with: |
122 |
| - identity-provider: ${{ secrets.IDENTITY_PROVIDER }} |
123 |
| - service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }} |
124 |
| - project-id: ${{ secrets.PROJECT_ID }} |
125 |
| - build-command: npm run build -- --mode dev |
126 |
| - env: |
127 |
| - VITE_FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }} |
128 |
| - |
129 | 57 | deploy-cloudrun-dev:
|
130 | 58 | name: Deploy Cloud Run to dev
|
131 | 59 | runs-on: ubuntu-latest
|
|
0 commit comments