chore(ci): limit token scope in workflows
This commit is contained in:
parent
b1a3bc8565
commit
fd15939ae8
|
@ -75,6 +75,9 @@ on:
|
||||||
type: string
|
type: string
|
||||||
default: '["self-hosted","ephemeral", "linux"]'
|
default: '["self-hosted","ephemeral", "linux"]'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
||||||
|
|
|
@ -23,6 +23,9 @@ on:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
||||||
|
|
|
@ -10,6 +10,9 @@ on:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_deps_integrity:
|
check_deps_integrity:
|
||||||
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
||||||
|
|
|
@ -8,6 +8,9 @@ on:
|
||||||
ref:
|
ref:
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
|
@ -15,7 +18,6 @@ jobs:
|
||||||
timeout-minutes: 360
|
timeout-minutes: 360
|
||||||
permissions:
|
permissions:
|
||||||
actions: read
|
actions: read
|
||||||
contents: read
|
|
||||||
security-events: write
|
security-events: write
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04
|
image: ghcr.io/emqx/emqx-builder/5.1-4:1.14.5-25.3.2-2-ubuntu22.04
|
||||||
|
|
|
@ -8,6 +8,9 @@ on:
|
||||||
- cron: "0 * * * *"
|
- cron: "0 * * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rerun-failed-jobs:
|
rerun-failed-jobs:
|
||||||
if: github.repository_owner == 'emqx'
|
if: github.repository_owner == 'emqx'
|
||||||
|
|
|
@ -19,6 +19,9 @@ env:
|
||||||
TF_VAR_prometheus_remote_write_url: ${{ secrets.TF_EMQX_PERF_TEST_PROMETHEUS_REMOTE_WRITE_URL }}
|
TF_VAR_prometheus_remote_write_url: ${{ secrets.TF_EMQX_PERF_TEST_PROMETHEUS_REMOTE_WRITE_URL }}
|
||||||
SLACK_WEBHOOK_URL: ${{ secrets.TF_EMQX_PERF_TEST_SLACK_URL }}
|
SLACK_WEBHOOK_URL: ${{ secrets.TF_EMQX_PERF_TEST_SLACK_URL }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -13,9 +13,14 @@ on:
|
||||||
required: true
|
required: true
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
upload:
|
upload:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -14,6 +14,9 @@ on:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run_conf_tests:
|
run_conf_tests:
|
||||||
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
||||||
|
|
|
@ -17,6 +17,9 @@ on:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
basic-tests:
|
basic-tests:
|
||||||
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
||||||
|
|
|
@ -26,6 +26,9 @@ on:
|
||||||
env:
|
env:
|
||||||
IS_CI: "yes"
|
IS_CI: "yes"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run_emqx_app_tests:
|
run_emqx_app_tests:
|
||||||
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
||||||
|
|
|
@ -17,6 +17,9 @@ on:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
helm_test:
|
helm_test:
|
||||||
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
||||||
|
|
|
@ -14,6 +14,9 @@ on:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
relup_test_plan:
|
relup_test_plan:
|
||||||
runs-on: ["${{ inputs.runner }}", 'linux', 'x64', 'ephemeral']
|
runs-on: ["${{ inputs.runner }}", 'linux', 'x64', 'ephemeral']
|
||||||
|
|
|
@ -11,6 +11,9 @@ on:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
spellcheck:
|
spellcheck:
|
||||||
strategy:
|
strategy:
|
||||||
|
|
|
@ -8,6 +8,9 @@ on:
|
||||||
- cron: "0 * * * *"
|
- cron: "0 * * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
if: github.repository_owner == 'emqx'
|
if: github.repository_owner == 'emqx'
|
||||||
|
|
|
@ -20,6 +20,9 @@ on:
|
||||||
env:
|
env:
|
||||||
IS_CI: "yes"
|
IS_CI: "yes"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
static_checks:
|
static_checks:
|
||||||
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
runs-on: ${{ fromJSON(inputs.runner_labels) }}
|
||||||
|
|
Loading…
Reference in New Issue