Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,17 @@ jobs:
tag: ${{ steps.resolve.outputs.tag }}
steps:
- id: resolve
env:
REF_TYPE: ${{ github.ref_type }}
CHOSEN: ${{ inputs.hardware_tag }}
run: |
tag="$HARDWARE_TAG"
if [[ "$tag" == nightly ]]; then
# A release is built on orchard's newest release, never on a nightly:
# orchard removes nightlies after 14 days, and the release links its files.
if [[ "$REF_TYPE" == tag && -z "$CHOSEN" ]]; then
tag=$(curl -fsSL --retry 3 https://api.github.com/repos/OrchardLinux/orchard/releases/latest |
python3 -c 'import json, sys; print(json.load(sys.stdin)["tag_name"])')
elif [[ "$tag" == nightly ]]; then
tag=$(curl -fsSL --retry 3 https://github.com/OrchardLinux/orchard/releases/download/nightly/latest.json |
python3 -c 'import json, sys; print(json.load(sys.stdin)["name"])')
fi
Expand Down
Loading