-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (40 loc) · 1.31 KB
/
push_branch.yml
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
name: docker push branch
on:
workflow_dispatch:
jobs:
docker_push:
name: docker push
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- uses: "actions/checkout@v3"
- uses: docker/setup-buildx-action@v2
with:
install: true
- uses: google-github-actions/auth@v0
id: google_auth
with:
token_format: access_token
workload_identity_provider: projects/472305719257/locations/global/workloadIdentityPools/github-actions/providers/ghactions-provider
service_account: [email protected]
- name: docker login
uses: docker/login-action@v2
with:
registry: us-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.google_auth.outputs.access_token }}
- name: docker push
uses: docker/build-push-action@v3
with:
secrets: |
"github_oauth_token=${{ secrets.CI_PRIVATE_REPOS_GH_TOKEN }}"
context: .
push: true
file: Dockerfile
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
us-docker.pkg.dev/lantern-cloud/containers/http-proxy:${{ github.ref_name }}