Skip to content

Commit c6a949e

Browse files
authored
[INLONG-12083][CI] Upgrade github actions version and specify permission of actions (#12084)
1 parent e204cb1 commit c6a949e

14 files changed

Lines changed: 103 additions & 54 deletions

.github/labeler.yml

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,51 +16,66 @@
1616
#
1717

1818
component/agent:
19-
- 'inlong-agent/**/*'
19+
- changed-files:
20+
- any-glob-to-any-file: 'inlong-agent/**/*'
2021

2122
component/dataproxy:
22-
- 'inlong-dataproxy/**/*'
23+
- changed-files:
24+
- any-glob-to-any-file: 'inlong-dataproxy/**/*'
2325

2426
component/manager:
25-
- 'inlong-manager/**/*'
27+
- changed-files:
28+
- any-glob-to-any-file: 'inlong-manager/**/*'
2629

2730
component/sort:
28-
- 'inlong-sort/**/*'
29-
- 'inlong-sort-standalone/**/*'
31+
- changed-files:
32+
- any-glob-to-any-file:
33+
- 'inlong-sort/**/*'
34+
- 'inlong-sort-standalone/**/*'
3035

3136
component/tubemq:
32-
- 'inlong-tubemq/**/*'
37+
- changed-files:
38+
- any-glob-to-any-file: 'inlong-tubemq/**/*'
3339

3440
component/dashboard:
35-
- 'inlong-dashboard/**/*'
41+
- changed-files:
42+
- any-glob-to-any-file: 'inlong-dashboard/**/*'
3643

3744
component/audit:
38-
- 'inlong-audit/**/*'
45+
- changed-files:
46+
- any-glob-to-any-file: 'inlong-audit/**/*'
3947

4048
component/sdk:
41-
- 'inlong-sdk/**/*'
49+
- changed-files:
50+
- any-glob-to-any-file: 'inlong-sdk/**/*'
4251

4352
service/ci:
44-
- '.github/actions/**/*'
45-
- '.github/workflows/**/*'
46-
- '.github/labeler.yml'
47-
- '.github/PULL_REQUEST_TEMPLATE.md'
48-
- '.github/ISSUE_TEMPLATE/**/*'
53+
- changed-files:
54+
- any-glob-to-any-file:
55+
- '.github/actions/**/*'
56+
- '.github/workflows/**/*'
57+
- '.github/labeler.yml'
58+
- '.github/PULL_REQUEST_TEMPLATE.md'
59+
- '.github/ISSUE_TEMPLATE/**/*'
4960

5061
service/docker:
51-
- '**/Dockerfile'
52-
- '**/*-docker.sh'
53-
- 'inlong-agent/agent-docker/**/*'
54-
- 'inlong-audit/audit-docker/**/*'
55-
- 'inlong-dataproxy/dataproxy-docker/**/*'
56-
- 'inlong-manager/manager-docker/**/*'
57-
- 'inlong-tubemq/tubemq-docker/**/*'
58-
- 'docker/docker-compose/**/*'
59-
- 'docker/build-docker-images.sh'
60-
- 'docker/publish-by-arch.sh'
62+
- changed-files:
63+
- any-glob-to-any-file:
64+
- '**/Dockerfile'
65+
- '**/*-docker.sh'
66+
- 'inlong-agent/agent-docker/**/*'
67+
- 'inlong-audit/audit-docker/**/*'
68+
- 'inlong-dataproxy/dataproxy-docker/**/*'
69+
- 'inlong-manager/manager-docker/**/*'
70+
- 'inlong-tubemq/tubemq-docker/**/*'
71+
- 'docker/docker-compose/**/*'
72+
- 'docker/build-docker-images.sh'
73+
- 'docker/publish-by-arch.sh'
6174

6275
service/k8s:
63-
- '.github/ct.yml'
64-
- '.github/kind.yml'
65-
- 'docker/kubernetes/**/*'
66-
- 'inlong-tubemq/tubemq-docker/tubemq-k8s/**/*'
76+
- changed-files:
77+
- any-glob-to-any-file:
78+
- '.github/ct.yml'
79+
- '.github/kind.yml'
80+
- 'docker/kubernetes/**/*'
81+
- 'inlong-tubemq/tubemq-docker/tubemq-k8s/**/*'

.github/workflows/ci_build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ on:
5252
- 'inlong-tubemq/**'
5353
- '!**.md'
5454

55+
permissions:
56+
contents: read
57+
5558
jobs:
5659
build:
5760
name: Build

.github/workflows/ci_chart_test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ env:
4040
CT_CONFIG_PATH: '.github/ct.yml'
4141
KIND_CONFIG_PATH: '.github/kind.yml'
4242

43+
permissions:
44+
contents: read
45+
4346
jobs:
4447
chart-test:
4548
name: Lint and test charts
@@ -57,12 +60,12 @@ jobs:
5760
submodules: true
5861

5962
- name: Set up Helm
60-
uses: azure/setup-helm@v1
63+
uses: azure/setup-helm@v4
6164
with:
6265
version: v3.5.0
6366

6467
- name: Set up Python
65-
uses: actions/setup-python@v2
68+
uses: actions/setup-python@v5
6669
with:
6770
python-version: 3.7
6871

.github/workflows/ci_check_format.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ name: InLong Code Format Check
1919

2020
on: [ push, pull_request ]
2121

22+
permissions:
23+
contents: read
24+
2225
jobs:
2326
build:
2427
name: Code Format Check

.github/workflows/ci_check_license.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ name: InLong Check License Header
1919

2020
on: [ push, pull_request ]
2121

22+
permissions:
23+
contents: read
24+
2225
jobs:
2326
check-license:
2427
name: Check license header
@@ -28,7 +31,7 @@ jobs:
2831
uses: actions/checkout@v4
2932

3033
- name: Check license header
31-
uses: apache/skywalking-eyes@v0.3.0
34+
uses: apache/skywalking-eyes@v0.6.0
3235
with:
3336
log: info
3437
config: .licenserc.yaml

.github/workflows/ci_check_pr_title.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ on:
2525
- edited
2626
- synchronize
2727

28+
permissions:
29+
contents: read
30+
2831
jobs:
2932
check:
3033
name: Check pull request title

.github/workflows/ci_docker.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ on:
4646
- 'inlong-tubemq/tubemq-docker/**'
4747
- '!**.md'
4848

49+
permissions:
50+
contents: read
51+
4952
jobs:
5053
docker:
5154
name: Docker build and push
@@ -90,16 +93,16 @@ jobs:
9093
distribution: adopt
9194

9295
- name: Set up Python
93-
uses: actions/setup-python@v3
96+
uses: actions/setup-python@v5
9497
with:
9598
python-version: 3.7
9699

97100
- name: Set up QEMU dependency
98-
uses: docker/setup-qemu-action@v2
101+
uses: docker/setup-qemu-action@v3
99102

100103
- name: Set up Docker Buildx
101104
id: buildx
102-
uses: docker/setup-buildx-action@v2
105+
uses: docker/setup-buildx-action@v3
103106

104107
- name: Cache Maven packages
105108
uses: actions/cache@v4

.github/workflows/ci_greeting.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,29 @@
1818
name: InLong Greeting
1919

2020
on:
21-
pull_request:
21+
pull_request_target:
2222
types:
2323
- opened
2424
issues:
2525
types:
2626
- opened
2727

28+
permissions:
29+
issues: write
30+
pull-requests: write
31+
2832
jobs:
2933
greeting:
30-
name: Greeting
34+
name: Greet First-Time Contributors
3135
runs-on: ubuntu-22.04
32-
permissions:
33-
issues: write
34-
pull-requests: write
3536
steps:
36-
- name: Interact with newcomers
37-
uses: actions/first-interaction@v1
38-
continue-on-error: true
37+
- uses: actions/first-interaction@v3
3938
with:
40-
repo-token: ${{ secrets.GITHUB_TOKEN }}
41-
pr-message: |
42-
Hello @${{ github.actor }}, thank you for submitting a PR to InLong 💖 We will respond as soon as possible ⏳
43-
This seems to be your first PR 🌠 Please be sure to follow our [Contribution Guidelines](https://inlong.apache.org/community/how-to-contribute).
44-
If you have any questions in the meantime, you can also ask us on the [InLong Discussions](https://github.com/apache/inlong/discussions) 🔍
4539
issue-message: |
4640
Hello @${{ github.actor }}, thank you for opening your first issue in InLong 🧡 We will respond as soon as possible ⏳
4741
If this is a bug report, please provide screenshots or error logs for us to reproduce your issue, so we can do our best to fix it.
4842
If you have any questions in the meantime, you can also ask us on the [InLong Discussions](https://github.com/apache/inlong/discussions) 🔍
43+
pr-message: |
44+
Hello @${{ github.actor }}, thank you for submitting a PR to InLong 💖 We will respond as soon as possible ⏳
45+
This seems to be your first PR 🌠 Please be sure to follow our [Contribution Guidelines](https://inlong.apache.org/community/how-to-contribute).
46+
If you have any questions in the meantime, you can also ask us on the [InLong Discussions](https://github.com/apache/inlong/discussions) 🔍

.github/workflows/ci_labeler.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,25 @@
1717

1818
name: InLong Pull Request Labeler
1919

20-
on: pull_request
20+
on:
21+
pull_request_target:
22+
types:
23+
- opened
24+
- synchronize
25+
- reopened
26+
27+
permissions:
28+
contents: read
29+
pull-requests: write
2130

2231
jobs:
2332
label:
2433
name: Label
2534
runs-on: ubuntu-22.04
26-
permissions:
27-
contents: read
28-
pull-requests: write
2935
steps:
3036
- name: Label the PR
31-
uses: actions/labeler@v4
37+
uses: actions/labeler@v5
3238
with:
3339
repo-token: ${{ secrets.GITHUB_TOKEN }}
3440
configuration-path: .github/labeler.yml
35-
sync-labels: true
41+
sync-labels: true

.github/workflows/ci_stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
pull-requests: write
3131
steps:
3232
- name: Mark issues and PRs
33-
uses: actions/stale@v5
33+
uses: actions/stale@v9
3434
with:
3535
repo-token: ${{ secrets.GITHUB_TOKEN }}
3636
stale-issue-message: 'This issue is stale because it has been open for 60 days with no activity.'

0 commit comments

Comments
 (0)