Merge pull request #110 from getlantern/bandit-url-overrides #61
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: docker push main | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'Dockerfile' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - '**.go' | |
| - '!.github/**' | |
| jobs: | |
| go: | |
| uses: ./.github/workflows/go.yaml | |
| secrets: inherit | |
| docker_push: | |
| name: docker push | |
| needs: [go] | |
| 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: ghactions@lantern-cloud.iam.gserviceaccount.com | |
| - 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/arm64,linux/amd64 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| build-args: | | |
| VERSION=${{ github.ref_name }} | |
| COMMIT=${{ github.sha }} | |
| tags: | | |
| us-docker.pkg.dev/lantern-cloud/containers/sing-box:latest |