Skip to content

Commit 2b5696e

Browse files
authored
Merge pull request #1712 from Kobzol/use-local-code
Use local `sync-team` code for performing dry runs
2 parents f8eaf46 + 5c2b569 commit 2b5696e

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/dry-run.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ jobs:
3131
steps:
3232
- uses: actions/checkout@v4
3333
with:
34-
repository: rust-lang/sync-team
34+
# Always checkout the master branch to avoid checking out
35+
# code of untrusted PRs.
36+
# This might break the dry-run if code or schema modifications
37+
# are performed, we can selectively allow that in the future
38+
# e.g. if the author of the PR is trusted.
39+
ref: 'master'
3540
persist-credentials: false
3641

3742
- name: Install Rust Stable
@@ -136,8 +141,10 @@ jobs:
136141
run: |
137142
# Perform build and execution separately to avoid any potential output from
138143
# cargo leaking into the output file.
139-
cargo build --release
140-
./target/release/sync-team print-plan --services github --team-json team-api 2>&1 | tee -a output.txt
144+
cargo build --manifest-path sync-team/Cargo.toml --release
145+
./sync-team/target/release/sync-team print-plan \
146+
--services github \
147+
--team-json team-api 2>&1 | tee -a output.txt
141148
142149
- name: Prepare comment
143150
run: |

sync-team/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ clap = { version = "4.5", features = ["derive", "env"] }
99
reqwest = { version = "0.12.8", features = ["blocking", "json", "rustls-tls", "charset", "http2", "macos-system-configuration"], default-features = false }
1010
log = "0.4"
1111
env_logger = "0.11"
12-
rust_team_data = { git = "https://github.com/rust-lang/team", features = ["email-encryption"] }
12+
rust_team_data = { path = "../rust_team_data", features = ["email-encryption"] }
1313
serde = { version = "1.0", features = ["derive"] }
1414
anyhow = "1.0"
1515
base64 = "0.22"
@@ -22,3 +22,5 @@ secrecy = "0.10"
2222
indexmap = "2.6.0"
2323
derive_builder = "0.20.2"
2424
insta = "1.40.0"
25+
26+
[workspace]

0 commit comments

Comments
 (0)