Update CI to support mono repo #3
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: main | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
backend: ${{ steps.changes.outputs.backend }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dorny/paths-filter@v3 | ||
id: changes | ||
with: | ||
filters: | | ||
automation: &automation | ||
- '.github/workflows/**' | ||
- 'deployments/**' | ||
backend: | ||
- *automation | ||
- 'thallium-backend/**' | ||
generate-inputs: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
outputs: | ||
sha-tag: ${{ steps.sha-tag.outputs.sha-tag }} | ||
lower-repo: ${{ steps.lower-repo.outputs.lower-repo }} | ||
steps: | ||
- name: Create SHA Container Tag | ||
id: sha-tag | ||
run: | | ||
tag=$(cut -c 1-7 <<< $GITHUB_SHA) | ||
echo "sha-tag=$tag" >> $GITHUB_OUTPUT | ||
lint: | ||
uses: ./.github/workflows/lint.yaml | ||
build-backend: | ||
if: ${{ needs.changes.outputs.backend == 'true' }} | ||
needs: [changes, generate-inputs, lint] | ||
uses: ./.github/workflows/build-deploy.yml | ||
Check failure on line 52 in .github/workflows/main.yaml GitHub Actions / .github/workflows/main.yamlInvalid workflow file
|
||
with: | ||
sha-tag: ${{ needs.generate-inputs.outputs.sha-tag }} | ||
project: backend | ||
secrets: inherit |