Skip to content

Commit e018c5e

Browse files
nihaopaulclaude
andcommitted
ci: add PR build job so dependabot bumps get compile/test verification
Adds a cargo build+test job triggered on pull_request, and gates the docker push job behind it (release-only). Previously the workflow only ran on release events, so no Rust checks ran against any PRs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 319fad1 commit e018c5e

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/rust.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,32 @@ name: Rust Build CI
33
on:
44
release:
55
types: [published]
6+
pull_request:
7+
branches: [main]
68

79
env:
810
CARGO_TERM_COLOR: always
911

1012
jobs:
13+
build:
14+
name: build and test
15+
permissions:
16+
contents: read
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: check repository
20+
uses: actions/checkout@v4
21+
22+
- name: build
23+
run: cargo build --release
24+
25+
- name: test
26+
run: cargo test
27+
1128
docker:
1229
name: push docker image to hub
30+
if: github.event_name == 'release'
31+
needs: build
1332
permissions:
1433
contents: read
1534
runs-on: ubuntu-latest
@@ -37,4 +56,3 @@ jobs:
3756
push: true
3857
tags: ${{ steps.meta.outputs.tags }}
3958
annotations: ${{ steps.meta.outputs.annotations }}
40-
# tags: nihaopaul/forward-auth:latest

0 commit comments

Comments
 (0)