From db996224301c08be33bde5934962336bbfd8b464 Mon Sep 17 00:00:00 2001 From: Joshua Ji Date: Sun, 7 Jan 2024 05:16:00 +0000 Subject: [PATCH] Test yet again --- .github/workflows/_deployment.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/_deployment.yml b/.github/workflows/_deployment.yml index 014adf9..38768be 100644 --- a/.github/workflows/_deployment.yml +++ b/.github/workflows/_deployment.yml @@ -18,14 +18,22 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + + - name: Google Auth + id: auth + uses: 'google-github-actions/auth@v0' + with: + token_format: 'access_token' + workload_identity_provider: '${{ secrets.WIF_PROVIDER }}' + service_account: '${{ secrets.WIF_SERVICE_ACCOUNT }}' - # https://github.com/docker/login-action/tree/v3?tab=readme-ov-file#service-account-based-authentication-1 - - name: Login to GAR - uses: docker/login-action@v2 + - name: Log ingo Google Artifact Registry + id: docker-auth + uses: 'docker/login-action@v1' with: - registry: ${{ vars.REGION }}-docker.pkg.dev - username: _json_key - password: ${{ secrets.SERVICE_ACCOUNT_KEY_JSON }} + username: 'oauth2accesstoken' + password: '${{ steps.auth.outputs.access_token }}' + registry: '${{ vars.REGION }}-docker.pkg.dev' - name: Build, tag and push container id: build-image