Skip to content

Back Core and Platform version to snapshot #2541

Back Core and Platform version to snapshot

Back Core and Platform version to snapshot #2541

Workflow file for this run

name: Snapshot to GCF
on:
push:
branches:
- 4.7.x
jobs:
deploy:
name: Deploy job
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
- name: Build the JAR
run: ./gradlew starter-api:test starter-gcp-function:test starter-gcp-function:shadowJar
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
PREDICTIVE_TEST_SELECTION: "${{ github.event_name == 'pull_request' && 'true' || 'false' }}"
- name: Authenticate into Google Cloud Platform
uses: google-github-actions/[email protected]
with:
service_account_email: ${{ secrets.GCLOUD_EMAIL }}
service_account_key: ${{ secrets.GCLOUD_AUTH }}
project_id: ${{ secrets.GCLOUD_FUNCTION_PROJECT }}
- name: Deploy to Cloud Function
run: |
cd starter-gcp-function/build/libs
gcloud functions deploy ${{ secrets.GCLOUD_SNAPSHOT_FUNCTION_NAME }} --trigger-http --project ${{ secrets.GCLOUD_FUNCTION_PROJECT }} --region us-central1 --allow-unauthenticated --service-account=${{ secrets.GCLOUD_EMAIL }} --quiet --entry-point io.micronaut.gcp.function.http.HttpFunction --gen2 --runtime java21