Skip to content

Commit a0dfb9a

Browse files
authored
Merge pull request #526 from multiversx/workflow-permissions
Set permissions for workflows
2 parents 7f8b7bf + d0ee70a commit a0dfb9a

7 files changed

Lines changed: 29 additions & 7 deletions

File tree

.github/workflows/build-windows.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches: [main, feat/*]
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build:
1316
name: Build and Test mxpy for ${{ matrix.os }}, python ${{ matrix.python-version }}

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches: [main, feat/*]
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build:
1316
name: Build and Test mxpy for ${{ matrix.os }}, python ${{ matrix.python-version }}

.github/workflows/install-macos-pipx.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [main, feat/*]
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
env:
912
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1013

.github/workflows/install-ubuntu-pipx.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [main, feat/*]
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
env:
912
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1013

.github/workflows/mypy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: mypy reviewdog check
22
on: [pull_request]
3+
4+
permissions:
5+
contents: read
6+
37
jobs:
48
mypy:
59
name: runner / mypy

.github/workflows/test-localnet-tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [main, feat/*]
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
env:
912
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1013

@@ -40,10 +43,10 @@ jobs:
4043
export PYTHONPATH=.
4144
python3 -m multiversx_sdk_cli.cli localnet prerequisites --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_remote.toml
4245
python3 -m multiversx_sdk_cli.cli localnet build --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_remote.toml
43-
46+
4447
# "Go" and artifacts from "GOPATH/pkg/mod" are not needed anymore.
4548
sudo rm -rf ~/multiversx-sdk/golang
46-
49+
4750
python3 -m multiversx_sdk_cli.cli localnet clean --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_remote.toml
4851
python3 -m multiversx_sdk_cli.cli localnet config --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_remote.toml
4952
nohup python3 -m multiversx_sdk_cli.cli localnet start --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_remote.toml > localnet.log 2>&1 & echo $! > localnet.pid

.github/workflows/test-localnet.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [main, feat/*]
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
env:
912
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1013

@@ -40,10 +43,10 @@ jobs:
4043
python3 -m multiversx_sdk_cli.cli config set github_api_token ${{ secrets.GITHUB_TOKEN }}
4144
python3 -m multiversx_sdk_cli.cli localnet prerequisites --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_remote.toml
4245
python3 -m multiversx_sdk_cli.cli localnet build --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_remote.toml
43-
46+
4447
# "Go" and artifacts from "GOPATH/pkg/mod" are not needed anymore.
4548
sudo rm -rf ~/multiversx-sdk/golang
46-
49+
4750
python3 -m multiversx_sdk_cli.cli localnet clean --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_remote.toml
4851
python3 -m multiversx_sdk_cli.cli localnet config --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_remote.toml
4952
python3 -m multiversx_sdk_cli.cli localnet start --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_remote.toml --stop-after-seconds=120
@@ -62,13 +65,13 @@ jobs:
6265
6366
git clone https://github.com/multiversx/mx-chain-go --branch=master --single-branch ~/multiversx-sdk/sandbox/mx-chain-go
6467
git clone https://github.com/multiversx/mx-chain-proxy-go --branch=master --single-branch ~/multiversx-sdk/sandbox/mx-chain-proxy-go
65-
68+
6669
python3 -m multiversx_sdk_cli.cli localnet prerequisites --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_local.toml
6770
python3 -m multiversx_sdk_cli.cli localnet build --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_local.toml
68-
71+
6972
# "Go" and artifacts from "GOPATH/pkg/mod" are not needed anymore.
7073
sudo rm -rf ~/multiversx-sdk/golang
71-
74+
7275
python3 -m multiversx_sdk_cli.cli localnet clean --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_local.toml
7376
python3 -m multiversx_sdk_cli.cli localnet config --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_local.toml
7477
python3 -m multiversx_sdk_cli.cli localnet start --configfile=./multiversx_sdk_cli/tests/testdata/localnet_with_resolution_local.toml --stop-after-seconds=120

0 commit comments

Comments
 (0)