Bump the api-dings-gradle group in /api-dings with 4 updates #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
if: "github.ref == 'refs/heads/main'" | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker image | |
run: | | |
docker build --pull --tag ${IMAGE} . | |
- name: Push Docker image | |
if: "github.ref == 'refs/heads/main'" | |
run: | | |
docker push ${IMAGE} | |
- name: 'Authenticate to Google Cloud' | |
id: 'google' | |
uses: 'google-github-actions/auth@v1' | |
if: "github.ref == 'refs/heads/main'" | |
with: | |
credentials_json: ${{ secrets.SALSA_CREDENTIALS }} | |
- name: NAIS SLSA Provenance Action | |
uses: nais/salsa-action@v0.0.1-beta | |
if: "github.ref == 'refs/heads/main'" | |
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 |