forked from diogopms/postgres-gcs-backup
-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (52 loc) · 1.58 KB
/
Copy pathpush.yml
File metadata and controls
62 lines (52 loc) · 1.58 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: build-and-push
on:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build-and-push:
name: build-and-push
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
contents: "read"
id-token: "write"
steps:
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v0"
with:
workload_identity_provider: "projects/753698311885/locations/global/workloadIdentityPools/github-pool/providers/github-provider"
service_account: "github-service-account@nitraai.iam.gserviceaccount.com"
- id: secrets
uses: google-github-actions/get-secretmanager-secrets@main
with:
secrets: |-
docker-hub-token:nitraai/docker-hub
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: vitaliytv
password: ${{ steps.secrets.outputs.docker-hub-token }}
- uses: actions/checkout@v3
- name: Set up Docker Context for Buildx
id: buildx-context
run: |
docker context create builders
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
endpoint: builders
- name: build amd64
run: |
docker buildx build . \
--progress=plain \
--platform linux/amd64 \
--tag nitra/postgres-gcs-backup:latest \
--squash \
--push