mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
Add an explicit permissions block to every workflow that relied on the
repository default. Entry points that only call reusable workflows get
permissions: {} and grant each call what the called workflow needs:
contents: read for the bundle and docker builds, contents: write for the
release, nothing for the admin-console dispatch (it uses its own token).
Workflows that check out code get contents: read; the commit checker
also gets pull-requests: read to list the PR commits.
Signed-off-by: David Barragán Merino <david.barragan@kaleidos.net>
63 lines
1.2 KiB
YAML
63 lines
1.2 KiB
YAML
name: "CI: WASM"
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'render-wasm/**'
|
|
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- ready_for_review
|
|
|
|
push:
|
|
branches:
|
|
- develop
|
|
- staging
|
|
|
|
paths:
|
|
- 'render-wasm/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test-render-wasm:
|
|
if: ${{ !github.event.pull_request.draft }}
|
|
name: "Render WASM Tests"
|
|
runs-on: penpot-extended-runner
|
|
container:
|
|
image: penpotapp/devenv:latest
|
|
volumes:
|
|
- /var/cache/github-runner/m2:/root/.m2
|
|
- /var/cache/github-runner/gitlib:/root/.gitlibs
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Format
|
|
working-directory: ./render-wasm
|
|
run: |
|
|
cargo fmt --check
|
|
|
|
- name: Lint
|
|
working-directory: ./render-wasm
|
|
run: |
|
|
./lint
|
|
|
|
- name: Test
|
|
working-directory: ./render-wasm
|
|
run: |
|
|
./test
|