Skip to content

Build and Publish

Build and Publish #33

name: Build and Publish
on:
workflow_dispatch: # Allow manual triggering of the workflow
push:
branches:
- main
paths:
- charts/**
- src/**
- build.gradle.kts
- settings.gradle.kts
- gradle.properties
- Dockerfile
permissions:
contents: read
packages: write
jobs:
changes:
runs-on: ubuntu-latest
outputs:
app: ${{ steps.filter.outputs.app }}
charts: ${{ steps.filter.outputs.charts }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Filter paths
id: filter
uses: dorny/paths-filter@v3
with:
base: main
filters: |
app:
- 'src/**'
- 'build.gradle.kts'
- 'settings.gradle.kts'
- 'gradle.properties'
- 'Dockerfile'
charts:
- 'charts/**'
app:
name: Build and Publish App
needs: changes
if: needs.changes.outputs.app == 'true' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/.app-build-publish.yaml
secrets: inherit
charts:
name: Build and Publish Charts
needs: app
if: always()
uses: ./.github/workflows/.charts-publish.yaml
with:
app-version: ${{ needs.app.outputs.version }}
secrets: inherit