Skip to content

Commit b59da7e

Browse files
authored
refactor(ci): integrate actionlint workflow into ci.yml (#40321)
1 parent 700fcb1 commit b59da7e

2 files changed

Lines changed: 37 additions & 18 deletions

File tree

.github/workflows/actionlint.yml

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

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
source-hash: ${{ steps.source.outputs.hash }}
3737
packages-build-cache-key: ${{ steps.ci-cache-keys.outputs.packages-build-cache-key }}
3838
meteor-rc-cache-key: ${{ steps.ci-cache-keys.outputs.meteor-rc-cache-key }}
39+
github-actions-changed: ${{ steps.diff.outputs.actions-changed }}
3940
# this is 100% intentional, secrets are not available for forks, so ee-tests will always fail
4041
# to avoid this, we are using a dummy license, expiring at 2026-07-01
4142
enterprise-license: Uo7Jcr6WW0XYA8ydHd+Sk6pZ9/0V6dIASnyTwvUrNym/zJg2Ma3eYNKkC8osXLCc72y1ahohnWY7/+7IYkvono3GYXQR+IGvYbbrVgNR6OjMahd9P/odHZL1GFTm2qHrEL5Hh/XEOG+YluFeRdWPzCizQlp4zGGOi0+PkQo096TR9NVCLrsErVl2MW1WM6ZM1W5EUJG9pKly4BQnaOTUAlor1im6i8qPTDCKrISZfLiZEWuQKaPW/GE3mRKjQNjDh0CabX1N2S880pRRGoozBYAnp2NmFfrQW0+5ihKisBTIeMbMZ7K5NE5PkYU1nhQDcc+rpDHtwG9Ceg5X0J+oea3UfrPTmDON2aSI0iO22kvL6G7QI3fyrEIvJrMbxcNKxAFeQYgnjisw/b06+chWSG4jG686Fx58XrVS87dFhWL9WoGltsk1dJCntUQvI1sX6zOfpvyg1iWRnHfYDOrwoWlX57XMm29fWineEoqnOOTOVnA/uP+DKEhercQ9Xuo7Cr6zJxpQpwd03e7ODVjiEbTDqlkZE687rmxRCD4Wmu8L86WIl2xSEIajKLX301Ww5mz/FdLqk+Mg32lkW66W3azQKvJ1440NBrYxhpJ+dl9vSFMb3s1+xnz1cYUbjUcq9mARvORcgy5mLwKulmqT6Sq0Uvbv10YCO0TW0beXYW8=
@@ -133,6 +134,16 @@ jobs:
133134
echo "DOCKER_TAG: ${DOCKER_TAG}"
134135
echo "gh-docker-tag=${DOCKER_TAG}" >> "$GITHUB_OUTPUT"
135136
137+
- id: diff
138+
env:
139+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140+
GH_PR_NUM: ${{ github.event.number }}
141+
run: |
142+
if gh pr diff --name-only --repo "${GITHUB_REPOSITORY}" "${GH_PR_NUM}" | grep -q -e .github/workflows -e .github/actions; then
143+
echo "Workflow changes detected"
144+
echo "actions-changed=true" >> "$GITHUB_OUTPUT"
145+
fi
146+
136147
notify-draft-services:
137148
name: 🚀 Notify external services - draft
138149
runs-on: ubuntu-24.04-arm
@@ -479,6 +490,32 @@ jobs:
479490
baseline-tag: develop
480491
size-thresholds: '{"rocketchat":{"mb":11}}'
481492

493+
actionlint:
494+
name: 🔎 Code Check - Action Lint
495+
needs: [release-versions]
496+
if: needs.release-versions.outputs.github-actions-changed
497+
runs-on: ubuntu-24.04-arm
498+
env:
499+
ACTIONLINT_VERSION: 1.7.12
500+
steps:
501+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
502+
503+
- name: Get actionlint
504+
shell: bash
505+
run: |
506+
TAR_NAME="actionlint_${ACTIONLINT_VERSION}_$(echo "${RUNNER_OS}_${RUNNER_ARCH}" | tr '[:upper:]' '[:lower:]').tar.gz"
507+
echo "Downloading ${TAR_NAME}..."
508+
curl -fsSLO "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/${TAR_NAME}"
509+
curl -fsSLo checksums.txt "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_checksums.txt"
510+
grep " ${TAR_NAME}$" "checksums.txt" | sha256sum -c -
511+
tar -xzf "${TAR_NAME}" actionlint
512+
513+
- name: Run actionlint
514+
shell: bash
515+
run: |
516+
./actionlint -color
517+
518+
482519
checks:
483520
needs: [release-versions, packages-build]
484521

0 commit comments

Comments
 (0)