Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added gcp auth in build stage #46

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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