Skip to content

Commit

Permalink
YAML fixes, restrict GH Actions perms (#1349)
Browse files Browse the repository at this point in the history
* Yaml: Remove redundant quotes
* GitHub Actions: Set top-level permissions to read-all
  • Loading branch information
EWouters authored Sep 18, 2024
1 parent 41cf43d commit b86fa05
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 20 deletions.
14 changes: 7 additions & 7 deletions .github/actions/pnpm-node-install/action.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: 'Install Node, pnpm and dependencies.'
description: 'Install Node, pnpm and dependencies using cache.'
name: Install Node, pnpm and dependencies.
description: Install Node, pnpm and dependencies using cache.

inputs:
node-version:
description: 'Node.js version'
description: Node.js version
required: true
pnpm-version:
description: 'pnpm version'
description: pnpm version
required: true
pnpm-install-args:
description: 'Extra arguments for pnpm install, e.g. --no-frozen-lockfile.'
description: Extra arguments for pnpm install, e.g. --no-frozen-lockfile.

runs:
using: 'composite'
using: composite
steps:
- uses: pnpm/action-setup@v4
with:
Expand All @@ -21,7 +21,7 @@ runs:
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: 'pnpm'
cache: pnpm
- name: Install JS dependencies
run: pnpm install ${{ inputs.pnpm-install-args }}
shell: bash
16 changes: 8 additions & 8 deletions .github/actions/poetry-python-install/action.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: 'Install Python, poetry and dependencies.'
description: 'Install Python, Poetry and poetry dependencies using cache'
name: Install Python, poetry and dependencies.
description: Install Python, Poetry and poetry dependencies using cache

inputs:
python-version:
description: 'Python version'
description: Python version
required: true
poetry-version:
description: 'Poetry version'
description: Poetry version
required: true
poetry-working-directory:
description: 'Working directory for poetry command.'
description: Working directory for poetry command.
required: false
default: '.'
default: .
poetry-install-args:
description: 'Extra arguments for poetry install, e.g. --with tests.'
description: Extra arguments for poetry install, e.g. --with tests.
required: false

runs:
using: 'composite'
using: composite
steps:
- name: Cache poetry install
uses: actions/cache@v4
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
push:
branches: [main, dev]

permissions: read-all

jobs:
pytest:
uses: ./.github/workflows/pytest.yaml
Expand All @@ -23,5 +25,5 @@ jobs:
name: Run CI
needs: [mypy, pytest, e2e-tests]
steps:
- name: 'Done'
- name: Done
run: echo "Done"
2 changes: 2 additions & 0 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: E2ETests

on: [workflow_call]

permissions: read-all

jobs:
ci:
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Mypy

on: [workflow_call]

permissions: read-all

jobs:
mypy:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
release:
types: [published]

permissions: read-all

jobs:
ci:
uses: ./.github/workflows/ci.yaml
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Pytest

on: [workflow_call]

permissions: read-all

jobs:
pytest:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
packages:
- 'frontend/'
- 'libs/react-components/'
- 'libs/react-client/'
- 'libs/copilot/'
- frontend/
- libs/react-components/
- libs/react-client/
- libs/copilot/

0 comments on commit b86fa05

Please sign in to comment.