/ .woodpecker.yml
.woodpecker.yml
 1  variables:
 2    - &rust_image "registry.ac-dc.network/rust-builder:1.92.0-ci"
 3  
 4  steps:
 5    setup:
 6      image: *rust_image
 7      commands:
 8        - rustup show
 9        - cargo --version
10      when:
11        - event: [pull_request, manual]
12  
13    fmt:
14      image: *rust_image
15      commands:
16        - cargo fmt --check
17      when:
18        - event: [pull_request, manual]
19  
20    clippy:
21      image: *rust_image
22      environment:
23        CARGO_INCREMENTAL: "0"
24      commands:
25        - cargo clippy -- -D warnings
26      when:
27        - event: [pull_request, manual]
28  
29    check:
30      image: *rust_image
31      environment:
32        CARGO_INCREMENTAL: "0"
33      commands:
34        - cargo check
35      when:
36        - event: [pull_request, manual]
37  
38    build:
39      image: *rust_image
40      environment:
41        CARGO_INCREMENTAL: "0"
42      commands:
43        - cargo build --release
44      when:
45        - event: [pull_request, manual]
46  
47    test:
48      image: *rust_image
49      environment:
50        CARGO_INCREMENTAL: "0"
51      commands:
52        - cargo test
53      when:
54        - event: [pull_request, manual]
55  
56    radicle-sync:
57      image: *rust_image
58      commands:
59        - curl -sfX POST http://source.ac-dc.network:8766/push/actus || true
60      when:
61        - event: push
62          branch: main
63  
64    github-sync:
65      image: *rust_image
66      secrets: [github_token]
67      commands:
68        - git remote add github https://x-access-token:$GITHUB_TOKEN@github.com/Novarra-BBX/actus.git 2>/dev/null || true
69        - git push github main --force
70      when:
71        - event: push
72          branch: main