diff --git a/.github/workflows/auto-close-issues.yml b/.github/workflows/auto-close-issues.yml index 72ac018794..b7319b8b34 100644 --- a/.github/workflows/auto-close-issues.yml +++ b/.github/workflows/auto-close-issues.yml @@ -11,8 +11,13 @@ permissions: issues: write pull-requests: read +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: false + jobs: close_issues: + name: Close linked issues if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index 87304ccf70..48add35a26 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -10,8 +10,13 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: lint: + name: Lint runs-on: ubuntu-latest steps: diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index e73a20f200..ba9370305f 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -12,8 +12,13 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: test: + name: Test strategy: matrix: include: diff --git a/.github/workflows/continuous-release.yml b/.github/workflows/continuous-release.yml index ed66423935..2605010a55 100644 --- a/.github/workflows/continuous-release.yml +++ b/.github/workflows/continuous-release.yml @@ -13,16 +13,25 @@ permissions: pull-requests: write issues: write +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: false + jobs: publish: + name: Publish if: github.repository == 'processing/p5.js' runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 22 + package-manager-cache: false - name: Install dependencies run: npm ci diff --git a/.github/workflows/contributors-png.yml b/.github/workflows/contributors-png.yml index 4178a5e4a8..29422c6d03 100644 --- a/.github/workflows/contributors-png.yml +++ b/.github/workflows/contributors-png.yml @@ -8,8 +8,13 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: + name: Update contributors.png if: github.ref == 'refs/heads/main' && github.repository == 'processing/p5.js' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/git-hooks.yml b/.github/workflows/git-hooks.yml new file mode 100644 index 0000000000..3ef7799a14 --- /dev/null +++ b/.github/workflows/git-hooks.yml @@ -0,0 +1,29 @@ +name: "Git Hooks" + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: ~ + +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + run-prek: + name: prek run --all-files + runs-on: ubuntu-24.04 + timeout-minutes: 1 + + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Run prek + uses: j178/prek-action@4e14d07f9231acabce116ccfca13b13dd9755ece # v3.0.0 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index cc10da56c3..d9d3be5168 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -5,8 +5,14 @@ on: permissions: contents: read issues: write + +concurrency: + group: ${{ github.workflow }}-${{ github.event.issue.number || github.ref }} + cancel-in-progress: false + jobs: triage: + name: Triage issues runs-on: ubuntu-latest steps: - uses: github/issue-labeler@98b5412841f6c4b0b3d9c29d53c13fad16bd7de2 # v3.2 diff --git a/.github/workflows/release-workflow-v1.yml b/.github/workflows/release-workflow-v1.yml index 5f3657ce0d..a69573b17b 100644 --- a/.github/workflows/release-workflow-v1.yml +++ b/.github/workflows/release-workflow-v1.yml @@ -4,6 +4,10 @@ name: New p5.js v1 release permissions: contents: write +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + on: push: tags: @@ -24,6 +28,8 @@ jobs: - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 22 # Keep at 22 purposefully for v1 + package-manager-cache: false + - name: Check prerelease id: semver shell: bash diff --git a/.github/workflows/release-workflow-v2.yml b/.github/workflows/release-workflow-v2.yml index 11792aa01a..28486749d2 100644 --- a/.github/workflows/release-workflow-v2.yml +++ b/.github/workflows/release-workflow-v2.yml @@ -4,6 +4,10 @@ name: New p5.js 2.x release permissions: contents: write +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + on: push: tags: @@ -24,6 +28,8 @@ jobs: - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 22 + package-manager-cache: false + - name: Check prerelease id: semver shell: bash diff --git a/.github/workflows/stewards-update.yml b/.github/workflows/stewards-update.yml index 0058b73920..eebd512a48 100644 --- a/.github/workflows/stewards-update.yml +++ b/.github/workflows/stewards-update.yml @@ -11,8 +11,13 @@ permissions: contents: write pull-requests: write +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: + name: Update steward table if: github.ref == 'refs/heads/main' && github.repository == 'processing/p5.js' runs-on: ubuntu-latest steps: diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 0000000000..017ee9e4a8 --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,4 @@ +rules: + # Temp disabled to satisfy CI. Can be revisited later. + secrets-outside-env: + disable: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..080686f9cc --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: + - repo: https://github.com/zizmorcore/zizmor-pre-commit + rev: v1.29.0 + hooks: + - id: zizmor + args: ["--no-progress", "--persona=auditor"]