Skip to content

Commit

Permalink
added gcp auth in build stage
Browse files Browse the repository at this point in the history
  • Loading branch information
kcs-bandihareesh committed Dec 18, 2024
1 parent c8098b3 commit e138f31
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/vertx-parent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

0 comments on commit e138f31

Please # to comment.