99 branches :
1010 - main
1111 - release-*
12- workflow_dispatch :
1312
1413concurrency :
1514 group : ${{ github.workflow }}-${{ github.ref }}
1615 cancel-in-progress : true
1716
17+ env :
18+ MARKDOWNLINT_CLI_VER : 0.44.0
19+
1820jobs :
1921 pre-checks :
2022 runs-on : ubuntu-latest
2123 outputs :
2224 filtered_projects : ${{ steps.filter-changes.outputs.filtered_projects }}
2325 other_changed_projects : ${{ steps.filter-changes.outputs.other_changed_projects }}
2426 steps :
25- - uses : actions/checkout@v4
27+ - uses : actions/checkout@v4.2.2
2628 - name : " Verify Branch Name"
2729 uses : open-edge-platform/orch-ci/verify-branch-name@main
2830 - name : " Discover Changed Subfolders"
@@ -31,14 +33,40 @@ jobs:
3133 - name : " Filter Out Unwanted Changed Subfolders"
3234 id : filter-changes
3335 run : |
34- folders_to_remove='[".github",".reuse","LICENSES",".git","os-profiles"]'
36+ folders_to_remove='[".github",".reuse","LICENSES",".git","os-profiles","" ]'
3537
3638 changed_projects='${{ steps.discover-changes.outputs.changed_projects }}'
3739 filtered_projects=$(echo "$changed_projects" | jq -cr --argjson folders_to_remove "$folders_to_remove" 'map(select(. as $item | $folders_to_remove | index($item) | not))')
3840 other_changed_projects=$(echo "$changed_projects" | jq -cr --argjson filtered_projects "$filtered_projects" 'map(select(. as $item | $filtered_projects | index($item) | not))')
3941
4042 echo "filtered_projects=$filtered_projects" >> $GITHUB_OUTPUT
4143 echo "other_changed_projects=$other_changed_projects" >> $GITHUB_OUTPUT
44+ pre-merge-root :
45+ needs : pre-checks
46+ if : ${{ contains(needs.pre-checks.outputs.other_changed_projects, '.github') || contains(needs.pre-checks.outputs.other_changed_projects, '.reuse') || contains(needs.pre-checks.outputs.other_changed_projects, 'LICENSES') || contains(needs.pre-checks.outputs.other_changed_projects, '""')}}
47+ runs-on : ubuntu-latest
48+ steps :
49+ - uses : actions/checkout@v4.2.2
50+ - uses : actions/setup-node@v4.3.0
51+ with :
52+ node-version : ' 18'
53+ - run : |
54+ npm install -g \
55+ "markdownlint-cli@${{ env.MARKDOWNLINT_CLI_VER }}"
56+ - uses : actions/setup-python@v5.5.0
57+ id : setup_python
58+ with :
59+ python-version : ' 3.13'
60+ - name : Restore cached virtualenv
61+ uses : actions/cache@v4.2.3
62+ with :
63+ key : venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
64+ path : venv_infra
65+
66+ - name : Run mdlint
67+ run : make mdlint
68+ - name : Run license check
69+ run : make license
4270 pre-merge-pipeline :
4371 needs : pre-checks
4472 if : ${{ needs.pre-checks.outputs.filtered_projects != '[]' }}
@@ -86,15 +114,15 @@ jobs:
86114 runs-on : ubuntu-latest
87115 steps :
88116 - name : Checkout code
89- uses : actions/checkout@v4
117+ uses : actions/checkout@v4.2.2
90118 with :
91119 # Checkout the branch that triggered the workflow to avoid detached HEAD
92120 ref : ${{ github.head_ref }}
93121 - uses : open-edge-platform/orch-ci/.github/actions/bootstrap@main
94122 with :
95123 bootstrap_tools : " yq,aws,oras"
96124 - name : Configure AWS credentials
97- uses : aws-actions/configure-aws-credentials@v4
125+ uses : aws-actions/configure-aws-credentials@v4.1.0
98126 with :
99127 aws-access-key-id : ${{ secrets.NO_AUTH_S3_PUSH_USERNAME }}
100128 aws-secret-access-key : ${{ secrets.NO_AUTH_S3_PUSH_PASSWD }}
@@ -117,14 +145,14 @@ jobs:
117145 echo "PUBLISH=$PUBLISH" >> $GITHUB_ENV
118146 - name : Configure AWS credentials
119147 if : ${{ env.PUBLISH == 'true' }}
120- uses : aws-actions/configure-aws-credentials@v4
148+ uses : aws-actions/configure-aws-credentials@v4.1.0
121149 with :
122150 aws-access-key-id : ${{ secrets.NO_AUTH_ECR_PUSH_USERNAME }}
123151 aws-secret-access-key : ${{ secrets.NO_AUTH_ECR_PUSH_PASSWD }}
124152 aws-region : us-west-2
125153 - name : Login to Amazon ECR
126154 if : ${{ env.PUBLISH == 'true' }}
127- uses : aws-actions/amazon-ecr-login@v2
155+ uses : aws-actions/amazon-ecr-login@v2.0.1
128156 with :
129157 registries : " 080137407410"
130158 - if : ${{ env.PUBLISH == 'true'}}
@@ -152,7 +180,7 @@ jobs:
152180 final-check :
153181 runs-on : ubuntu-latest
154182 if : ${{ always() }}
155- needs : [pre-merge-pipeline, pre-merge-os-profiles]
183+ needs : [pre-merge-root, pre-merge- pipeline, pre-merge-os-profiles, pre-merge-os-profiles-2 ]
156184 steps :
157185 - name : Final Status Check
158186 run : |
0 commit comments