Skip to content

Commit eee5efd

Browse files
authored
chore: Cleanup CI with unused triggers (#14)
* Cleanup CI with unused triggers * Move root linter to pre-merge workflows
1 parent d568ebd commit eee5efd

11 files changed

+38
-90
lines changed

.github/workflows/auto-add-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
label:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/labeler@v5
18+
- uses: actions/labeler@v5.0.0

.github/workflows/auto-close.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
stale-auto-close:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/stale@v5.1.1
19+
- uses: actions/stale@v9.1.0
2020
with:
2121
repo-token: ${{ secrets.GITHUB_TOKEN }}
2222
stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Make a comment or update the PR to avoid closing PR after 15 days.'

.github/workflows/post-merge-api.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
- release-*
1212
paths:
1313
- 'api/**'
14-
workflow_dispatch:
1514

1615
jobs:
1716
post-merge-pipeline:

.github/workflows/post-merge-apiv2.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
- release-*
1212
paths:
1313
- 'apiv2/**'
14-
workflow_dispatch:
1514

1615
jobs:
1716
post-merge-pipeline:

.github/workflows/post-merge-bulk-import-tools.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
- release-*
1212
paths:
1313
- 'bulk-import-tools/**'
14-
workflow_dispatch:
1514

1615
jobs:
1716
post-merge-pipeline:
@@ -22,7 +21,6 @@ jobs:
2221
run_dep_version_check: true
2322
run_build: true
2423
run_docker_build: false
25-
# TODO: add publish of binaries
2624
run_docker_push: false
2725
run_version_tag: true
2826
run_artifact: true

.github/workflows/post-merge-exporters-inventory.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
- release-*
1212
paths:
1313
- 'exporters-inventory/**'
14-
workflow_dispatch:
1514

1615
jobs:
1716
post-merge-pipeline:

.github/workflows/post-merge-inventory.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
- release-*
1212
paths:
1313
- 'inventory/**'
14-
workflow_dispatch:
1514

1615
jobs:
1716
post-merge-pipeline:

.github/workflows/post-merge-tenant-controller.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
- release-*
1212
paths:
1313
- 'tenant-controller/**'
14-
workflow_dispatch:
1514

1615
jobs:
1716
post-merge-pipeline:

.github/workflows/pre-merge.yml

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@ on:
99
branches:
1010
- main
1111
- release-*
12-
workflow_dispatch:
1312

1413
concurrency:
1514
group: ${{ github.workflow }}-${{ github.ref }}
1615
cancel-in-progress: true
1716

17+
env:
18+
MARKDOWNLINT_CLI_VER: 0.44.0
19+
1820
jobs:
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: |

.github/workflows/publish_on_pr_comment.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)