Skip to content

Commit 38ee4f2

Browse files
Merge #789
789: build images weekly, without cache r=Alexhuszagh a=Emilgardis Co-authored-by: Emil Gardström <[email protected]>
2 parents 204d123 + c2f6a1f commit 38ee4f2

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

.github/workflows/weekly.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
schedule:
3+
- cron: '0 0 * * 5'
4+
workflow_dispatch:
5+
6+
name: Check
7+
8+
env:
9+
CARGO_NET_RETRY: 3
10+
CARGO_HTTP_CHECK_REVOKE: false
11+
12+
jobs:
13+
weekly:
14+
name: Check All Targets - No Cache
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: ./.github/actions/setup-rust
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v1
21+
- name: Build xtask
22+
run: cargo build -p xtask
23+
- name: Build Docker image
24+
id: build-docker-image
25+
run: cargo xtask build-docker-image -v --no-cache --from-ci --tag weekly

xtask/src/build_docker_image.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,17 @@ pub fn build_docker_image(
101101
targets = crate::util::get_matrix()?
102102
.iter()
103103
.filter(|m| m.os.starts_with("ubuntu"))
104-
.map(|m| m.target.clone())
104+
.map(|m| {
105+
format!(
106+
"{}{}",
107+
m.target,
108+
if let Some(sub) = &m.sub {
109+
format!(".{sub}")
110+
} else {
111+
<_>::default()
112+
}
113+
)
114+
})
105115
.collect();
106116
} else {
107117
targets = walkdir::WalkDir::new(metadata.workspace_root.join("docker"))

xtask/src/util.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ struct Env {
3131
#[derive(Debug, PartialEq, Eq, Deserialize)]
3232
pub struct Matrix {
3333
pub target: String,
34+
pub sub: Option<String>,
3435
#[serde(default)]
3536
pub run: i64,
3637
pub os: String,

0 commit comments

Comments
 (0)