Skip to content

Commit 9df902a

Browse files
committed
check-mirrors: fix minor bugs
* The root progress node should not have an estimated total * Use `actions/checkout@v3`, not `actions/checkout@v2` * Do not clean the repository; this removes the local cache, slowing down website deploys (since the same runner is used) * Do not attempt to send a push notification if it fails on a PR
1 parent 2913be6 commit 9df902a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.github/workflows/check-mirrors.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ jobs:
77
check:
88
runs-on: [self-hosted, website]
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
11+
with: { clean: false }
1112
- name: Check Mirrors
1213
run: |
1314
cd check-mirrors
1415
/home/ci/deps/zig-linux-x86_64-0.14.0/zig build run -- ../assets/community-mirrors.ziggy "$GITHUB_STEP_SUMMARY"
1516
notify-failure:
1617
runs-on: [self-hosted, website]
1718
needs: [check]
18-
if: ${{ always() && (needs.check.result == 'failure' || needs.check.result == 'timed_out') }}
19+
if: ${{ always() && (github.event_name != 'pull_request') && (needs.check.result == 'failure' || needs.check.result == 'timed_out') }}
1920
steps:
2021
- name: Send Notification
2122
env:

check-mirrors/main.zig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,7 @@ pub fn main() Allocator.Error!u8 {
189189

190190
std.log.info("{d} mirrors; {d} tarballs; {d} signatures", .{ mirrors.len, tarballs.items.len, minisigs.items.len });
191191

192-
var root_prog_node = std.Progress.start(.{
193-
.root_name = "check",
194-
.estimated_total_items = tarballs.items.len + minisigs.items.len,
195-
});
192+
var root_prog_node = std.Progress.start(.{ .root_name = "check" });
196193
defer root_prog_node.end();
197194
const tarballs_prog_node = root_prog_node.start("tarballs", tarballs.items.len);
198195
const minisigs_prog_node = root_prog_node.start("signatures", minisigs.items.len);

0 commit comments

Comments
 (0)