diff --git a/.github/workflows/vertx-parent.yaml b/.github/workflows/vertx-parent.yaml index 0d7c0cb..bcc5975 100644 --- a/.github/workflows/vertx-parent.yaml +++ b/.github/workflows/vertx-parent.yaml @@ -18,6 +18,19 @@ jobs: with: fetch-depth: 0 + - name: Authenticate to Google Cloud + uses: google-github-actions/auth@v2 + with: + project_id: ${{ secrets.WORKLOAD_IDENTITY_PROJECT }} + workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} + create_credentials_file: true + export_environment_variables: true + cleanup_credentials: true + + - name: Set up OAuth2 access token for Maven + run: | + echo "ACCESS_TOKEN=$(gcloud auth print-access-token)" >> $GITHUB_ENV + - name: Set up JDK uses: actions/setup-java@v4 with: @@ -108,4 +121,4 @@ jobs: - name: Deploy Snapshots run: | echo "Deploying snapshots" - mvn -s $HOME/.m2/settings.xml -Dmaven.wagon.http.retryHandler.count=3 --batch-mode -e -DskipTests=true deploy + mvn -s $HOME/.m2/settings.xml -Dmaven.wagon.http.retryHandler.count=3 --batch-mode -e -DskipTests=true deploy \ No newline at end of file