From f7a3591c538421008426b111334af751dcdc49eb Mon Sep 17 00:00:00 2001 From: Max Stepanov Date: Fri, 20 Jun 2025 17:18:31 +0300 Subject: [PATCH] set actions rights --- .github/workflows/deploy.yml | 4 +++- .github/workflows/test_on_deploy.yml | 6 ++++-- .github/workflows/test_on_pr.yml | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3c29d0f..87e0546 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,12 +10,14 @@ jobs: # Push a new release to PyPI deploy_to_pypi: name: Publish to PyPI + permissions: + contents: read runs-on: mdb-dev if: github.actor != 'mindsdbadmin' steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v5.1.0 + uses: actions/setup-python@v5.6.0 with: python-version: ${{ vars.CI_PYTHON_VERSION }} - name: Install dependencies diff --git a/.github/workflows/test_on_deploy.yml b/.github/workflows/test_on_deploy.yml index d5ea330..d010cde 100644 --- a/.github/workflows/test_on_deploy.yml +++ b/.github/workflows/test_on_deploy.yml @@ -7,14 +7,16 @@ on: jobs: test: runs-on: mdb-dev + permissions: + contents: read strategy: matrix: python-version: ['3.10'] steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5.6.0 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/test_on_pr.yml b/.github/workflows/test_on_pr.yml index bfccb7d..1cd0d21 100644 --- a/.github/workflows/test_on_pr.yml +++ b/.github/workflows/test_on_pr.yml @@ -7,16 +7,18 @@ on: jobs: test: + permissions: + contents: read runs-on: ${{ matrix.os }} strategy: matrix: os: [mdb-dev] python-version: ['3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5.6.0 with: python-version: ${{ matrix.python-version }}