Skip to content

Commit f75210f

Browse files
timotheeguerinmarkcowltadeleshtadelesh
authored
Add action lint ci (#4139)
Co-authored-by: Mark Cowlishaw <1054056+markcowl@users.noreply.github.com> Co-authored-by: Chenjie Shi <tadelesh.shi@live.cn> Co-authored-by: tadelesh <chenjieshi@microsoft.com>
1 parent 30a77ce commit f75210f

6 files changed

Lines changed: 61 additions & 27 deletions

File tree

.github/actionlint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
paths:
2+
.github/workflows/*.lock.yml:
3+
ignore:
4+
- ".+"

.github/matchers/actionlint.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "actionlint",
5+
"pattern": [
6+
{
7+
"regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"message": 4,
12+
"code": 5
13+
}
14+
]
15+
}
16+
]
17+
}

.github/workflows/consistency.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,16 @@ jobs:
101101
- run: pnpm run lint
102102
name: Lint
103103

104+
# cspell:ignore rhysd
105+
# Content copied from https://raw.githubusercontent.com/rhysd/actionlint/2ab3a12c7848f6c15faca9a92612ef4261d0e370/.github/actionlint-matcher.json
106+
- name: Add ActionLint Problem Matcher
107+
run: echo "::add-matcher::.github/matchers/actionlint.json"
108+
109+
- name: Lint GitHub Actions workflows
110+
uses: docker://rhysd/actionlint:1.7.11
111+
with:
112+
args: -color -verbose
113+
104114
# Check catalog is in sync with core
105115
version-consistency:
106116
name: Versions consistency

.github/workflows/doc-update.lock.yml

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/doc-update.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ steps:
4646
wget -q "https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz"
4747
tar -xzf "apache-maven-${MAVEN_VERSION}-bin.tar.gz" -C "$HOME"
4848
rm -f "apache-maven-${MAVEN_VERSION}-bin.tar.gz"
49-
echo "$HOME/apache-maven-${MAVEN_VERSION}/bin" >> $GITHUB_PATH
49+
echo "$HOME/apache-maven-${MAVEN_VERSION}/bin" >> "$GITHUB_PATH"
5050
5151
- name: Install repo dependencies
5252
run: pnpm install
@@ -69,7 +69,7 @@ steps:
6969
npx tsx eng/scripts/doc-updater/src/precompute.ts \
7070
--config "$CONFIG_INPUT" \
7171
--output /tmp/gh-aw/agent/context.json \
72-
$REBUILD_FLAG
72+
${REBUILD_FLAG:+"$REBUILD_FLAG"}
7373
7474
tools:
7575
edit:

.github/workflows/merge-release-in-main.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ jobs:
2525

2626
- name: Generate branch name
2727
id: branchname
28+
env:
29+
REF_NAME: ${{ github.ref_name }}
2830
run: |
29-
echo "::set-output name=branchname::backmerge/${{ github.ref_name }}-$(date +'%Y-%m-%d')"
31+
echo "branchname=backmerge/${REF_NAME}-$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
3032
- name: Create branch
33+
env:
34+
BRANCH: ${{ steps.branchname.outputs.branchname }}
3135
run: |
32-
branch="${{ steps.branchname.outputs.branchname }}"
33-
git checkout -b $branch
34-
git push --set-upstream origin $branch --force
36+
git checkout -b "$BRANCH"
37+
git push --set-upstream origin "$BRANCH"

0 commit comments

Comments
 (0)