refac: Reorganize folders #435
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: CI orchestrator | |
on: | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# | |
# License and Markdown Check | |
# | |
ci_base: | |
uses: Energinet-DataHub/.github/.github/workflows/ci-base.yml@v14 | |
with: | |
skip_license_check: true | |
secrets: | |
dh3serviceaccount_privatekey: ${{ secrets.dh3serviceaccount_privatekey }} | |
changes: | |
uses: ./.github/workflows/detect-changes.yml | |
ci_docker: | |
needs: changes | |
uses: Energinet-DataHub/.github/.github/workflows/python-build-and-push-docker-image.yml@v14 | |
with: | |
docker_changed: ${{ needs.changes.outputs.docker == 'true' }} | |
docker_changed_in_commit: ${{ needs.changes.outputs.docker_in_commit == 'true' }} | |
ci_electrical_heating: | |
needs: [changes, ci_docker] | |
if: ${{ needs.changes.outputs.electrical_heating == 'true' }} | |
uses: ./.github/workflows/ci-electrical-heating.yml | |
with: | |
image_tag: ${{ needs.ci_docker.outputs.image_tag }} | |
ci_capacity_settlement: | |
needs: [changes, ci_docker] | |
if: ${{ needs.changes.outputs.capacity_settlement == 'true' }} | |
uses: ./.github/workflows/ci-capacity-settlement.yml | |
with: | |
image_tag: ${{ needs.ci_docker.outputs.image_tag }} | |
# | |
# Branch policy status check | |
# | |
allow_merge_ci_orchestrator: | |
runs-on: ubuntu-latest | |
needs: | |
[ | |
changes, | |
ci_base, | |
ci_electrical_heating, | |
ci_capacity_settlement | |
] | |
if: | | |
always() | |
steps: | |
- name: Verify if merge is allowed | |
run: | | |
echo "${{ toJSON(needs) }}" | |
if [[ ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} = true ]]; then | |
echo "Failed" | |
exit 1 | |
fi |