Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
repository: 'gitbutlerapp/gitbutler'
- uses: actions/labeler@v6
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/push-e2e-img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
permissions: write-all
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
rust: ${{ steps.filter.outputs.rust }}
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: dorny/paths-filter@v3
id: filter
with:
Expand Down Expand Up @@ -49,6 +51,8 @@
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: ./.github/actions/init-env-node
- run: pnpm prettier

Expand All @@ -58,6 +62,8 @@
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: ./.github/actions/init-env-node
- run: pnpm lint

Expand All @@ -67,6 +73,8 @@
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: ./.github/actions/init-env-node
- run: pnpm check

Expand All @@ -76,6 +84,8 @@
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: ./.github/actions/init-env-node
- run: pnpm test

Expand All @@ -89,6 +99,8 @@
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- run: cargo fmt --check --all
- run: cargo check --workspace --all-targets

Expand All @@ -102,6 +114,8 @@
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
# TODO(qix-): we have to exclude the app here for now because for some
# TODO(qix-): reason it doesn't build with the docs feature enabled.
- run: cargo doc --no-deps --all-features --document-private-items -p gitbutler-git
Expand All @@ -114,6 +128,8 @@
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: EmbarkStudios/cargo-deny-action@f2ba7abc2abebaf185c833c3961145a3c275caad # v2.0.13
with:
command: check bans licenses sources
Expand All @@ -129,6 +145,8 @@
shell: bash
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Rust Cache
uses: Swatinem/rust-cache@v2.8.0
with:
Expand Down Expand Up @@ -186,9 +204,40 @@
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Rust Cache
uses: Swatinem/rust-cache@v2.8.0
with:
shared-key: windows-rust-testing
- name: 'cargo check'
run: cargo check --workspace --all-targets --features windows

# Check that all `actions/checkout` in CI jobs have `persist-credentials: false`.
check-no-persist-credentials:
runs-on: ubuntu-latest

env:
GLOB: .github/workflows/*.@(yaml|yml)

steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
sparse-checkout: '.github/workflows'
- name: Generate workflows list to scan
run: |
shopt -s extglob
printf '%s\n' ${{ env.GLOB }} | grep -v .github/workflows/publish.yaml >workflows.list
cat workflows.list
echo "Note that publish.yaml is excluded until it's ensured to not need this feature"
- name: Scan workflows
run: |
shopt -s extglob
yq '.jobs.*.steps[]
| select(.uses == "actions/checkout@*" and .with.["persist-credentials"]? != false)
| {"file": filename, "line": line, "name": (.name // .uses)}
| .file + ":" + (.line | tostring) + ": " + .name
' -- $(cat workflows.list) >query-output.txt
cat query-output.txt
test -z "$(<query-output.txt)" # Report failure if we found anything.
3 changes: 3 additions & 0 deletions .github/workflows/test-client-fe-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
if: ${{ github.event_name != 'workflow_dispatch' }}
- uses: actions/checkout@v5
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
persist-credentials: false
ref: ${{ github.event.inputs.sha }}
- name: Setup node environment
uses: ./.github/actions/init-env-node
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-e2e-blackbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ jobs:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
if: ${{ github.event_name != 'workflow_dispatch' }}
- uses: actions/checkout@v5
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
persist-credentials: false
ref: ${{ github.event.inputs.sha }}
- name: Install Tauri OS dependencies
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-e2e-playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ jobs:
GIT_CONFIG_GLOBAL: ${{ github.workspace }}/e2e/playwright/fixtures/.gitconfig
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
if: ${{ github.event_name != 'workflow_dispatch' }}
- uses: actions/checkout@v5
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
persist-credentials: false
ref: ${{ github.event.inputs.sha }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2.8.0
Expand Down
Loading