Skip to content

Add examples & publish starter workflows on push #113

Add examples & publish starter workflows on push

Add examples & publish starter workflows on push #113

Workflow file for this run

name: Test actions
on:
push:
branches: [trunk]
pull_request:
branches: [trunk]
env:
APPLICATION_NAME: 'demo-api'
SYSTEM_NAMESPACE: 'core'
jobs:
unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
if: false
permissions:
contents: read
checks: write
issues: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./unittest
with:
checkout: 'false'
analyze:
name: Run CodeQL analysis
runs-on: ubuntu-latest
if: false
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./analyze
with:
checkout: 'false'
build:
name: Build
runs-on: ubuntu-latest
if: false
permissions:
contents: read
id-token: write
environment: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./build
with:
checkout: 'false'
name: ${{ env.APPLICATION_NAME }}
namespace: ${{ env.SYSTEM_NAMESPACE }}
dockerfile: '.github/test/src/Dockerfile'
severity: 'CRITICAL'
AZURE_CLIENT_ID: ${{ vars.ACR_CLIENT_ID }}
deploy-aks-dev:
name: Deploy to dev on AKS
needs: [build]
runs-on: ubuntu-latest
if: false
permissions:
contents: read
id-token: write
environment: dev
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./deploy
with:
checkout: 'false'
name: ${{ env.APPLICATION_NAME }}
namespace: ${{ env.SYSTEM_NAMESPACE }}
environment: 'dev'
helm-values-path: '.github/test/deploy/values.yml'
AZURE_CLIENT_ID: ${{ vars.AKS_CLIENT_ID }}
deploy-gke-dev:
name: Deploy to dev on GKE
needs: [build]
runs-on: ubuntu-latest
if: false
permissions:
contents: read
id-token: write
environment: dev
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./deploy
with:
checkout: 'false'
name: ${{ env.APPLICATION_NAME }}
namespace: ${{ env.SYSTEM_NAMESPACE }}
environment: 'dev'
helm-values-path: '.github/test/deploy/values.yml'
runtime-cloud-provider: 'GKE'
GC_SERVICE_ACCOUNT: ${{ vars.GC_SERVICE_ACCOUNT }}
GC_WORKLOAD_IDENTITY_PROVIDER: ${{ vars.GC_WORKLOAD_IDENTITY_PROVIDER }}
trivy-iac-scan:
name: Scan IaC with Trivy
runs-on: ubuntu-latest
if: false
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./trivy-iac-scan
with:
checkout: 'false'
terraform-format-check:
name: Check Terraform code formatting
runs-on: ubuntu-latest
if: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./terraform-format
with:
checkout: 'false'