Skip to content

Commit

Permalink
Fix an assumed permissions mismatch between the workflows uploading a…
Browse files Browse the repository at this point in the history
…nd downloading artifacts.
  • Loading branch information
afinetooth committed Sep 27, 2024
1 parent c34acc9 commit 3c0eff2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: build

permissions:
contents: write
actions: read

on:
pull_request:
branches:
Expand All @@ -14,6 +18,8 @@ permissions:
jobs:
build-windows:
runs-on: windows-2022
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -65,6 +71,8 @@ jobs:

build-linux:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
# # Debug step to verify event context
# - name: Print event context for build-linux
Expand Down Expand Up @@ -154,6 +162,8 @@ jobs:
release:
runs-on: ubuntu-latest
needs: [build-windows, build-linux]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
continue-on-error: true
steps:
Expand Down Expand Up @@ -200,6 +210,8 @@ jobs:
homebrew:
runs-on: ubuntu-latest
needs: [release]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
continue-on-error: true
steps:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test-binaries-qemu.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: test-binaries-qemu

permissions:
contents: read
actions: read

on:
workflow_run:
workflows: [build]
Expand All @@ -9,6 +13,9 @@ on:
jobs:
test-x86_64:
runs-on: ubuntu-22.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
# Debug step to list artifacts for the run
- name: List available artifacts
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-binaries.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: test-binaries

permissions:
contents: read
actions: read

on:
workflow_run:
workflows: [build]
Expand All @@ -10,6 +14,8 @@ jobs:
test_binaries:
name: Test Multi-Arch Binaries
runs-on: ubuntu-22.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

strategy:
matrix:
Expand Down

0 comments on commit 3c0eff2

Please sign in to comment.