From 86e4f72f0025f2f00ecd6fd852b4e1c68df9c751 Mon Sep 17 00:00:00 2001 From: Ashcon Partovi Date: Tue, 3 Oct 2023 12:02:15 -0700 Subject: [PATCH] Fix permissions for Github Actions --- .github/workflows/bun-ecosystem-test.yml | 50 ---------------------- .github/workflows/bun-linux-build.yml | 2 + .github/workflows/bun-mac-aarch64.yml | 2 + .github/workflows/bun-mac-x64-baseline.yml | 2 + .github/workflows/bun-mac-x64.yml | 2 + .github/workflows/prettier-fmt.yml | 2 + .github/workflows/zig-fmt.yml | 2 + 7 files changed, 12 insertions(+), 50 deletions(-) delete mode 100644 .github/workflows/bun-ecosystem-test.yml diff --git a/.github/workflows/bun-ecosystem-test.yml b/.github/workflows/bun-ecosystem-test.yml deleted file mode 100644 index 611ee5e1cf..0000000000 --- a/.github/workflows/bun-ecosystem-test.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: bun-ecosystem-test - -on: - schedule: - - cron: "0 15 * * *" # every day at 7am PST - workflow_dispatch: - inputs: - version: - description: "The version of Bun to run" - required: true - default: "canary" - type: string -jobs: - test: - name: ${{ matrix.tag }} - runs-on: ${{ matrix.os }} - if: github.repository_owner == 'oven-sh' - timeout-minutes: 10 - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - tag: linux-x64 - url: linux/x64?avx2=true - - os: ubuntu-latest - tag: linux-x64-baseline - url: linux/x64?baseline=true - # FIXME: runner fails with "No tests found"? - #- os: macos-latest - # tag: darwin-x64 - # url: darwin/x64?avx2=true - - os: macos-latest - tag: darwin-x64-baseline - url: darwin/x64?baseline=true - steps: - - id: checkout - name: Checkout - uses: Bhacaz/checkout-files@v2 - with: - files: packages/bun-internal-test - - id: setup - name: Setup - uses: oven-sh/setup-bun@v1 - with: - bun-download-url: https://bun.sh/download/${{ github.event.inputs.version }}/${{ matrix.url }} - - id: test - name: Test - working-directory: packages/bun-internal-test - run: bun run test:ecosystem diff --git a/.github/workflows/bun-linux-build.yml b/.github/workflows/bun-linux-build.yml index 932d7eef4c..9e0f56e6be 100644 --- a/.github/workflows/bun-linux-build.yml +++ b/.github/workflows/bun-linux-build.yml @@ -178,6 +178,8 @@ jobs: needs: [linux] if: github.event_name == 'pull_request' timeout-minutes: 20 + permissions: + pull-requests: write outputs: failing_tests: ${{ steps.test.outputs.failing_tests }} failing_tests_count: ${{ steps.test.outputs.failing_tests_count }} diff --git a/.github/workflows/bun-mac-aarch64.yml b/.github/workflows/bun-mac-aarch64.yml index 46ecf77f44..34532f14fd 100644 --- a/.github/workflows/bun-mac-aarch64.yml +++ b/.github/workflows/bun-mac-aarch64.yml @@ -417,6 +417,8 @@ jobs: runs-on: ${{ matrix.runner }} needs: [macOS] if: github.event_name == 'pull_request' && github.repository_owner == 'oven-sh' + permissions: + pull-requests: write timeout-minutes: 30 outputs: failing_tests: ${{ steps.test.outputs.failing_tests }} diff --git a/.github/workflows/bun-mac-x64-baseline.yml b/.github/workflows/bun-mac-x64-baseline.yml index 6d74771acc..0a414f1556 100644 --- a/.github/workflows/bun-mac-x64-baseline.yml +++ b/.github/workflows/bun-mac-x64-baseline.yml @@ -421,6 +421,8 @@ jobs: runs-on: ${{ matrix.runner }} needs: [macOS] if: github.event_name == 'pull_request' && github.repository_owner == 'oven-sh' + permissions: + pull-requests: write timeout-minutes: 30 outputs: failing_tests: ${{ steps.test.outputs.failing_tests }} diff --git a/.github/workflows/bun-mac-x64.yml b/.github/workflows/bun-mac-x64.yml index 6fbaa68207..85c4a392df 100644 --- a/.github/workflows/bun-mac-x64.yml +++ b/.github/workflows/bun-mac-x64.yml @@ -423,6 +423,8 @@ jobs: runs-on: ${{ matrix.runner }} needs: [macOS] if: github.event_name == 'pull_request' && github.repository_owner == 'oven-sh' + permissions: + pull-requests: write timeout-minutes: 30 outputs: failing_tests: ${{ steps.test.outputs.failing_tests }} diff --git a/.github/workflows/prettier-fmt.yml b/.github/workflows/prettier-fmt.yml index 877b34a6fd..c3d26157bf 100644 --- a/.github/workflows/prettier-fmt.yml +++ b/.github/workflows/prettier-fmt.yml @@ -12,6 +12,8 @@ jobs: prettier-fmt: name: prettier runs-on: ubuntu-latest + permissions: + pull-requests: write outputs: prettier_fmt_errs: ${{ steps.fmt.outputs.prettier_fmt_errs }} steps: diff --git a/.github/workflows/zig-fmt.yml b/.github/workflows/zig-fmt.yml index 04c4e1ec68..ebe77614f9 100644 --- a/.github/workflows/zig-fmt.yml +++ b/.github/workflows/zig-fmt.yml @@ -18,6 +18,8 @@ jobs: zig-fmt: name: zig fmt runs-on: ubuntu-latest + permissions: + pull-requests: write outputs: zig_fmt_errs: ${{ steps.fmt.outputs.zig_fmt_errs }} steps: