Skip to content

Create VERSIONS

Create VERSIONS #11

---
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Pre-Merge CI Pipeline
on:
push:
branches: [ ga-main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
bootstrap:
permissions:
contents: read
runs-on: ubuntu-24.04-16core-64GB
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: bootstrap action
uses: ./.github/actions/bootstrap
with:
gh_token: ${{ secrets.SYS_ORCH_GITHUB }}
bootstrap_tools: "all"
pre-checks:
runs-on: ubuntu-24.04-16core-64GB
outputs:
filtered_projects: ${{ steps.filter-changes.outputs.filtered_projects }}
other_changed_projects: ${{ steps.filter-changes.outputs.other_changed_projects }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: "Verify Branch Name"
uses: open-edge-platform/orch-ci/verify-branch-name@main
- name: "Discover Changed Subfolders"
id: discover-changes
uses: open-edge-platform/orch-ci/discover-changed-subfolders@main
- name: "Filter Out Unwanted Changed Subfolders"
id: filter-changes
run: |
folders_to_remove='[".github",".reuse","LICENSES",".git","os-profiles","libraries","microservices","tools",".gitmodules",""]'
changed_projects='${{ steps.discover-changes.outputs.changed_projects }}'
filtered_projects=$(echo "$changed_projects" | jq -cr --argjson folders_to_remove "$folders_to_remove" 'map(select(. as $item | $folders_to_remove | index($item) | not))')
other_changed_projects=$(echo "$changed_projects" | jq -cr --argjson filtered_projects "$filtered_projects" 'map(select(. as $item | $filtered_projects | index($item) | not))')
echo "filtered_projects=$filtered_projects" >> $GITHUB_OUTPUT
echo "other_changed_projects=$other_changed_projects" >> $GITHUB_OUTPUT
# TODO: generalize this part of the CI for all subcomponents
- name: "Get PR Description"
id: get_pr_description
run: |
PR_DESCRIPTION=$(curl -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}" \
| jq -r '.body')
PUBLISH=$(echo "$PR_DESCRIPTION" | grep -q '/publish🚢' && echo true || echo false)
echo $PUBLISH
echo "PUBLISH=$PUBLISH" >> $GITHUB_ENV
pre-merge-root:
needs: pre-checks
if: ${{ contains(needs.pre-checks.outputs.other_changed_projects, '.github') || contains(needs.pre-checks.outputs.other_changed_projects, 'LICENSES') || contains(needs.pre-checks.outputs.other_changed_projects, '""')}}
runs-on: ubuntu-24.04-16core-64GB
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
node-version: '18'
- run: |
npm install -g \
"markdownlint-cli@${{ env.MARKDOWNLINT_CLI_VER }}"
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
id: setup_python
with:
python-version: '3.13'
- name: Restore cached virtualenv
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
path: venv_infra