Merge pull request #62 from FINTLabs/chore/remove-unused-dependentRes… #37
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: 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 | |
uses: ./.github/workflows/.charts-publish.yaml | |
with: | |
app-version: ${{ needs.app.outputs.version }} | |
secrets: inherit | |
charts-only: | |
name: Build and Publish Charts Only | |
needs: [ changes ] | |
if: needs.changes.outputs.app == 'false' && github.event_name != 'workflow_dispatch' | |
uses: ./.github/workflows/.charts-publish.yaml | |
secrets: inherit |