|
1 | | -name: Github-ETL Deployment |
| 1 | +name: Github-ETL Build and Deployment |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
| 5 | + branches: |
| 6 | + - main |
5 | 7 | tags: |
6 | | - - release-** |
7 | | - |
8 | | -env: |
9 | | - IMAGE_NAME: mozilla-conduit/github-etl |
10 | | - GAR_LOCATION: us |
11 | | - GCP_PROJECT_ID: moz-fx-lando-prod |
12 | | - GAR_REPOSITORY: lando-prod |
| 8 | + - release-20[0-9][0-9][01][0-9][0-3][0-9].[0-9] # e.g. release-20231204.2 |
13 | 9 |
|
14 | 10 | jobs: |
15 | | - deploy: |
16 | | - runs-on: ubuntu-latest |
| 11 | + build: |
| 12 | + secrets: inherit |
17 | 13 | permissions: |
18 | 14 | contents: read |
19 | 15 | id-token: write |
20 | | - steps: |
21 | | - - uses: actions/checkout@v4 |
22 | | - - uses: docker/setup-buildx-action@v2 |
23 | | - - id: gcp-auth |
24 | | - name: Google authentication |
25 | | - uses: google-github-actions/auth@v2 |
26 | | - with: |
27 | | - token_format: "access_token" |
28 | | - service_account: artifact-writer@${{ env.GCP_PROJECT_ID }}.iam.gserviceaccount.com |
29 | | - workload_identity_provider: ${{ vars.GCPV2_GITHUB_WORKLOAD_IDENTITY_PROVIDER }} |
30 | | - - name: Log in to the container registry |
31 | | - uses: docker/login-action@v2 |
32 | | - with: |
33 | | - registry: ${{ env.GAR_LOCATION }}-docker.pkg.dev |
34 | | - username: oauth2accesstoken |
35 | | - password: ${{ steps.gcp-auth.outputs.access_token }} |
36 | | - - name: Build and push image |
37 | | - uses: docker/build-push-action@v3 |
38 | | - with: |
39 | | - context: . |
40 | | - target: base |
41 | | - tags: | |
42 | | - ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.GCP_PROJECT_ID }}/${{ env.GAR_REPOSITORY }}/github-etl:${{ github.ref_name }} |
43 | | - push: true |
44 | | - cache-from: type=gha |
45 | | - cache-to: type=gha,mode=max |
| 16 | + packages: write |
| 17 | + uses: mozilla-it/deploy-actions/.github/workflows/build-and-push.yml@main |
| 18 | + with: |
| 19 | + image_name: mozilla-conduit/github-etl |
| 20 | + gar_name: lando-prod |
| 21 | + project_id: moz-fx-lando-prod |
| 22 | + should_tag_ghcr: true |
| 23 | + prebuild_script: "" |
0 commit comments