-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-buildx-gcr.yml
More file actions
34 lines (29 loc) · 903 Bytes
/
docker-buildx-gcr.yml
File metadata and controls
34 lines (29 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Build
on:
push:
branches:
- master
- develop
pull_request:
types: [opened, synchronize, reopened]
dockerx-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: docker context create builders
- uses: docker/setup-buildx-action@v2
with:
endpoint: builders
- uses: 'google-github-actions/auth@v1'
with:
credentials_json: ${{ secrets.SA }}
- uses: 'google-github-actions/setup-gcloud@v1'
- name: Configure Docker auth for gcloud command-line
run: gcloud --quiet auth configure-docker && gcloud auth list
- name: Build and push image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: gcr.io/${{ secrets.PROJECT_ID }}/${{ github.repository }}:${{ github.sha }}