100 lines
3.2 KiB
YAML
100 lines
3.2 KiB
YAML
name: CI - Validate
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
- main
|
|
push:
|
|
branches:
|
|
- develop
|
|
|
|
jobs:
|
|
upload-event-file:
|
|
name: Upload Event File
|
|
if: ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }}
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Upload GitHub Event Payload
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: ci-event-file
|
|
path: ${{ github.event_path }}
|
|
retention-days: 7
|
|
|
|
chart-validation:
|
|
name: Helm Chart Validation
|
|
if: ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }}
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Install Helm
|
|
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
|
|
|
- name: Install chart-testing
|
|
uses: helm/chart-testing-action@6ec842c01de15ebb84c8627d2744a0c2f2755c9f # v2.8.0
|
|
|
|
- name: Run ct lint
|
|
run: ct lint --config deploy/helm/ct.yaml
|
|
|
|
migration-check:
|
|
name: Flyway Migration Check
|
|
if: ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }}
|
|
uses: ./.github/workflows/migrations-check.yml
|
|
permissions:
|
|
contents: read
|
|
with:
|
|
base_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
|
|
head_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
|
checkout_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
|
|
|
test-suite:
|
|
name: Test Suite
|
|
if: ${{ (github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')) && (needs.migration-check.result == 'success' || needs.migration-check.result == 'skipped') }}
|
|
needs: [migration-check]
|
|
uses: ./.github/workflows/test-suite.yml
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
with:
|
|
checkout_ref: ${{ github.sha }}
|
|
publish_test_results: false
|
|
|
|
packaging-smoke-test:
|
|
name: Packaging Smoke Test
|
|
if: ${{ (github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')) && needs.test-suite.result == 'success' }}
|
|
needs: [migration-check, test-suite]
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Set Up Docker Buildx
|
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
|
|
|
- name: Build Runtime Image
|
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
|
with:
|
|
context: .
|
|
file: Dockerfile
|
|
platforms: linux/amd64
|
|
push: false
|
|
build-args: |
|
|
APP_VERSION=ci-${{ github.sha }}
|
|
APP_REVISION=${{ github.sha }}
|
|
cache-from: type=gha,scope=image-shared
|