Skip to content

Commit

Permalink
fix: GitHub check run permissions (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianGoeb authored Oct 20, 2023
1 parent a895ce8 commit e04215f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ runs:
override: true
components: rustfmt, clippy, llvm-tools-preview

# example: https://github.com/actions/cache/blob/main/examples.md#rust---cargo
# needed dirs: https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci
- name: Cache cargo system
- name: Cache Cargo System (cargo install)
uses: actions/cache@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/
key: cargo-system-${{ runner.os }}-${{ hashFiles('~/.cargo/.crates.toml', '~/.cargo/.crates2.json') }}
- name: Cache cargo repo

# example: https://github.com/actions/cache/blob/main/examples.md#rust---cargo
- name: Cache Cargo Repo (cargo install)
uses: actions/cache@v3
with:
path: |
Expand All @@ -29,4 +30,3 @@ runs:
~/.cargo/git/db/
target/
key: cargo-repo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}

3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: CI

on:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -41,4 +43,3 @@ jobs:
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2.2.3
if: always()

5 changes: 5 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: PR

on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
# setup
- name: Checkout Repo
Expand Down

0 comments on commit e04215f

Please sign in to comment.