Skip to content

Commit bada097

Browse files
authored
feat: Update to use mozilla-it/deploy-actions
1 parent b83b7b9 commit bada097

File tree

1 file changed

+14
-36
lines changed

1 file changed

+14
-36
lines changed

.github/workflows/deploy.yml

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,23 @@
1-
name: Github-ETL Deployment
1+
name: Github-ETL Build and Deployment
22

33
on:
44
push:
5+
branches:
6+
- main
57
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
139

1410
jobs:
15-
deploy:
16-
runs-on: ubuntu-latest
11+
build:
12+
secrets: inherit
1713
permissions:
1814
contents: read
1915
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

Comments
 (0)