File tree Expand file tree Collapse file tree 2 files changed +21
-4
lines changed
Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 11{
2- "upstream_action_revision" : " cb3030da0487efd312ad3c07fc4ad1960d35ec60" ,
3- "source_tag" : " v3.6.2" ,
2+ "upstream_action_revision" : " def9f5a5c6a6b8751c0534e8813a5d0ad2635660" ,
3+ "source_tag" : " 2.1" ,
4+ "binary_revision" : " c79f1550609d4e9c4065a27fd599e76a94e0278d" ,
45 "checkout_action_tag" : " v4.2.2"
56}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ default_branch() {
1111}
1212
1313get_latest_revision () {
14- gh api " repos/$REPO /commits/$( default_branch) " \
14+ gh api " repos/$1 /commits/$( default_branch) " \
1515 | jq -r ' .sha'
1616}
1717
@@ -24,6 +24,20 @@ checkout_tag() {
2424 --json isLatest,tagName
2525}
2626
27+ magic_nix_cache_binary_rev () {
28+ sha=$( get_latest_revision " DeterminateSystems/magic-nix-cache" )
29+
30+ (
31+ echo " Checking to see if $sha for magic-nix-cache has binaries yet..."
32+ for arch in ARM64-macOS X64-macOS X64-Linux ARM64-Linux; do
33+ curl -LI --fail \
34+ https://install.determinate.systems/magic-nix-cache/rev/$sha /$arch
35+ done
36+ ) >&2
37+
38+ echo " $sha "
39+ }
40+
2741determinate_nix_action_major () {
2842 gh release list \
2943 --repo DeterminateSystems/determinate-nix-action \
@@ -34,12 +48,14 @@ determinate_nix_action_major() {
3448}
3549
3650main () {
37- revision=$( get_latest_revision)
51+ revision=$( get_latest_revision " $REPO " )
3852 checkout_tag=$( checkout_tag)
53+ mnc_binary_rev=$( magic_nix_cache_binary_rev)
3954
4055 jq -n ' $ARGS.named' \
4156 --arg upstream_action_revision " $revision " \
4257 --arg " source_tag" " $MAGIC_NIX_CACHE_TAG " \
58+ --arg " binary_revision" " $mnc_binary_rev " \
4359 --arg " checkout_action_tag" " $checkout_tag " \
4460 | cat > tools/state.json
4561}
You can’t perform that action at this time.
0 commit comments