Skip to content

Bump the debug-dings-gradle group in /debug-dings with 31 updates #25

Bump the debug-dings-gradle group in /debug-dings with 31 updates

Bump the debug-dings-gradle group in /debug-dings with 31 updates #25

Workflow file for this run

name: debug-dings main
on:
push:
paths:
- .github/workflows/debugdings-ci.yaml
- debug-dings/**
env:
IMAGE: ghcr.io/${{ github.repository }}:${{ github.sha }}
defaults:
run:
working-directory: ./debug-dings
jobs:
build:
name: Build and push Docker container
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v3
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14
- name: Setup build cache
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Gradle wrapper cache
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-wrapper-
- name: Run tests
run: ./gradlew clean test
- name: Build with Gradle
run: ./gradlew shadowJar -x test
- name: Login to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build an push the Docker image
run: |
docker build --pull --tag ${IMAGE} .
docker push ${IMAGE}
- name: 'Authenticate to Google Cloud'
id: 'google'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: ${{ secrets.SALSA_CREDENTIALS }}
- name: NAIS SLSA Provenance Action
uses: nais/salsa-action@v0.0.1-beta
with:
ecosystem: 'gradle'
image: ${{ env.IMAGE }}
key: ${{ secrets.SALSA_KMS_KEY }}
context: /debug-dings
deploy-dev-gcp:
name: Deploy to dev-gcp
needs: build
if: "github.ref == 'refs/heads/main'"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .nais/naiserator.yml
VARS: .nais/dev-gcp-vars.yml
deploy-prod-gcp:
name: Deploy to prod-gcp
needs: deploy-dev-gcp
if: "github.ref == 'refs/heads/main'"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: .nais/naiserator.yml
VARS: .nais/prod-gcp-vars.yml