Skip to content

Merge branch 'open-edge-platform:main' into main #20

Merge branch 'open-edge-platform:main' into main

Merge branch 'open-edge-platform:main' into main #20

Workflow file for this run

name: main
on:
workflow_dispatch:
pull_request:
branches:
- main
- 'release/app-[0-9]+\.[0-9]+'
- 'release/lib-[0-9]+\.[0-9]+'
push:
branches:
- main
- 'release/app-[0-9]+\.[0-9]+'
- 'release/lib-[0-9]+\.[0-9]+'
permissions: {} # No permissions by default
concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-parameters:
name: Prepare build parameters
runs-on: ${{ github.repository_owner == 'open-edge-platform' && 'overflow' || 'ubuntu-latest' }}
permissions:
contents: read
timeout-minutes: 10
outputs:
app_version: "${{ steps.app-version.outputs.version }}"
lib_version: "${{ steps.lib-version.outputs.version }}"
components-list: ${{ steps.change-detection.outputs.paths_list }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: change-detection
id: change-detection
uses: ./.github/actions/change-detection
- name: app-version
id: app-version
uses: ./.github/actions/build-version
with:
version-file-path: 'application/VERSION'
- name: lib-version
id: lib-version
uses: ./.github/actions/build-version
with:
version-file-path: 'library/VERSION'
library:
name: Library build
needs: build-parameters
permissions:
contents: read
if: needs.build-parameters.outputs.components-list && contains(fromJson(needs.build-parameters.outputs.components-list), 'library')
uses: ./.github/workflows/library.yml
with:
build_version: ${{ needs.build-parameters.outputs.lib_version }}
backend:
name: Backend build
needs: build-parameters
permissions:
contents: read
if: needs.build-parameters.outputs.components-list && contains(fromJson(needs.build-parameters.outputs.components-list), 'backend')
uses: ./.github/workflows/backend.yml
with:
build_version: ${{ needs.build-parameters.outputs.app_version }}
ui:
name: UI build
needs: build-parameters
permissions:
contents: read
pull-requests: write
if: needs.build-parameters.outputs.components-list && contains(fromJson(needs.build-parameters.outputs.components-list), 'ui')
uses: ./.github/workflows/ui.yml
distrib:
name: Distrib build
needs: [build-parameters]
permissions:
contents: read
packages: write # Permission to push packages to GHCR
id-token: write # Permission to request OIDC token for signing images
if: github.event_name != 'push' && needs.build-parameters.outputs.components-list && contains(fromJson(needs.build-parameters.outputs.components-list), 'distrib')
uses: ./.github/workflows/distrib.yml
with:
build_version: ${{ needs.build-parameters.outputs.app_version }}
markdown:
name: Markdown build
needs: build-parameters
permissions:
contents: read
if: needs.build-parameters.outputs.components-list && contains(fromJson(needs.build-parameters.outputs.components-list), 'markdown')
runs-on: ${{ github.repository_owner == 'open-edge-platform' && 'overflow' || 'ubuntu-latest' }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: DavidAnson/markdownlint-cli2-action@ce4853d43830c74c1753b39f3cf40f71c2031eb9 # v23.0.0
with:
config: '.github/.markdownlint-cli2.jsonc'
documentation:
name: Documentation markdown checks
needs: build-parameters
permissions:
contents: read
if: needs.build-parameters.outputs.components-list && contains(fromJson(needs.build-parameters.outputs.components-list), 'documentation')
uses: ./.github/workflows/documentation.yml
success:
name: Status checks
needs: [ build-parameters, library, backend, ui, distrib, markdown, documentation ]
runs-on: ${{ github.repository_owner == 'open-edge-platform' && 'overflow' || 'ubuntu-latest' }}
if: ${{ always() && !cancelled() }}
env:
CHECKS: ${{ join(needs.*.result, ' ') }}
steps:
- name: Check
run: |
for check in ${CHECKS}; do
echo "::notice::check=${check}"
if [[ "$check" != "success" && "$check" != "skipped" ]]; then
echo "::error ::Required status checks failed. They must succeed before this pull request can be merged."
exit 1
fi
done