File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,12 +54,11 @@ RUN apk add --no-cache ca-certificates
5454RUN addgroup -g 1000 appuser && \
5555 adduser -D -u 1000 -G appuser appuser
5656
57- WORKDIR /app
58- COPY --from=builder /app/target/release/pr-checker /app/pr-checker
57+ # GitHub Actions workspace is mounted at /github/workspace
58+ WORKDIR /github/workspace
59+ COPY --from=builder /app/target/release/pr-checker /usr/local/bin/pr-checker
5960
60- # Set ownership
61- RUN chown -R appuser:appuser /app
6261# Switch to non-root user
6362USER appuser
6463
65- ENTRYPOINT ["/app /pr-checker" ]
64+ ENTRYPOINT ["/usr/local/bin /pr-checker" ]
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ mod github;
1919mod rules;
2020
2121use clap:: Parser ;
22- use tracing:: { error, info} ;
22+ use tracing:: { error, info, warn } ;
2323
2424#[ derive( Parser ) ]
2525#[ command( name = "pr-checker" ) ]
@@ -59,6 +59,15 @@ async fn main() {
5959 )
6060 . init ( ) ;
6161
62+ // Ensure we operate in the GitHub workspace when running as an Action
63+ if let Ok ( ws) = std:: env:: var ( "GITHUB_WORKSPACE" ) {
64+ if let Err ( e) = std:: env:: set_current_dir ( & ws) {
65+ warn ! ( "Failed to set current dir to GITHUB_WORKSPACE={ws}: {e}" ) ;
66+ } else {
67+ info ! ( "Working directory set to GITHUB_WORKSPACE: {}" , ws) ;
68+ }
69+ }
70+
6271 let args = Args :: parse ( ) ;
6372
6473 // Get config path from args or GitHub Actions input or default
You can’t perform that action at this time.
0 commit comments