Skip to content

Bump com.jamesward.kotlin-universe-catalog #106

Bump com.jamesward.kotlin-universe-catalog

Bump com.jamesward.kotlin-universe-catalog #106

Workflow file for this run

on: push
jobs:
build:
name: build-and-deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
cache: 'gradle'
- name: Create Container
env:
PROJECT: ${{ secrets.GCP_PROJECT || 'wtf' }}
run: |
./gradlew jibDockerBuild --image=gcr.io/$PROJECT/${{ github.event.repository.name }}:${{ github.sha }}
- id: secret-check
name: Check for Secret Availability
run: |
if [ "${{ secrets.GCP_PROJECT }}" != '' ] && [ "${{ secrets.GCP_CREDENTIALS }}" != '' ]; then
echo "available=true" >> $GITHUB_OUTPUT;
else
echo "available=false" >> $GITHUB_OUTPUT;
fi
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v0.3
if: ${{ steps.secret-check.outputs.available == 'true' }}
with:
project_id: ${{ secrets.GCP_PROJECT }}
service_account_key: ${{ secrets.GCP_CREDENTIALS }}
export_default_credentials: true
- name: Push Container
if: ${{ steps.secret-check.outputs.available == 'true' }}
run: |
gcloud auth configure-docker
docker push gcr.io/${{ secrets.GCP_PROJECT }}/${{ github.event.repository.name }}:${{ github.sha }}
- name: Deploy Service
uses: jamesward/easycloudrun/deploy@main
if: ${{ steps.secret-check.outputs.available == 'true' }}
env:
PROJECT_ID: ${{ secrets.GCP_PROJECT }}
COMMIT_SHA: ${{ github.sha }}
IMAGE_NAME: ${{ github.event.repository.name }}
IMAGE_VERSION: ${{ github.sha }}
REGION: us-central1