Skip to content
Merged
Show file tree
Hide file tree
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
40 changes: 30 additions & 10 deletions .github/workflows/nas-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,47 @@ jobs:
# A hard bound over the 60-minute wait, whatever a single request does.
timeout-minutes: 62
runs-on: ubuntu-latest
outputs:
metadata_revision: ${{ steps.metadata.outputs.revision }}
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
ref: ${{ github.event_name == 'release' && github.event.repository.default_branch || github.sha }}
persist-credentials: false
# The compose, QNAP and Asustor smoke tests run the published image their
# package version names. docker.yml publishes it from the tag push, which
# starts alongside this release run, so a release waits for it. Any other
# run tests a version that must already be published.
- name: Wait for ghcr.io/blizzhacker/romarr at the packaged version
# Published tags cannot contain their own source checksum. Release runs
# wait for the matching package metadata to land on the default branch,
# then use that exact checkout throughout the workflow.
- name: Resolve package metadata and wait for the release image
id: metadata
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
WAIT_MINUTES: ${{ github.event_name == 'release' && '60' || '0' }}
TAG: ${{ github.event.release.tag_name }}
run: |
set -eu
version=$(sed -n 's/^QPKG_VER="\(.*\)"$/\1/p' packaging/qnap/qpkg/romarr/qpkg.cfg)
if [ -n "$TAG" ] && [ "$TAG" != "v$version" ]; then
echo "::error::Packages name $version but the release is $TAG"; exit 1
fi
deadline=$(( $(date +%s) + WAIT_MINUTES * 60 ))
package_version() {
sed -n 's/^QPKG_VER="\(.*\)"$/\1/p' packaging/qnap/qpkg/romarr/qpkg.cfg
}
version=$(package_version)
while [ -n "$TAG" ] && [ "$TAG" != "v$version" ]; do
if [ "$(date +%s)" -ge "$deadline" ]; then
echo "::error::Packages name $version but the release is $TAG"; exit 1
fi
echo "waiting for package metadata for $TAG"
sleep 30
git fetch -q --depth 1 origin "refs/heads/$DEFAULT_BRANCH"
git checkout -q --detach FETCH_HEAD
version=$(package_version)
done
echo "revision=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
image="ghcr.io/blizzhacker/romarr:$version"
published() {
token=$(curl -fsS --connect-timeout 10 --max-time 30 "https://ghcr.io/token?scope=repository:blizzhacker/romarr:pull" | jq -r .token)
curl -fsS --connect-timeout 10 --max-time 30 -o /dev/null --head -H "Authorization: Bearer $token" \
-H "Accept: application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json" \
"https://ghcr.io/v2/blizzhacker/romarr/manifests/$version"
}
deadline=$(( $(date +%s) + WAIT_MINUTES * 60 ))
until published; do
if [ "$(date +%s)" -ge "$deadline" ]; then
echo "::error::$image is not published. Push the v$version tag and let docker.yml publish it first."
Expand All @@ -81,6 +96,7 @@ jobs:
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
ref: ${{ needs.image.outputs.metadata_revision }}
persist-credentials: false
- name: docker compose config, and a missing library refuses to start
run: |
Expand Down Expand Up @@ -112,10 +128,12 @@ jobs:

synology:
name: Synology SPK (spksrc)
needs: image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
ref: ${{ needs.image.outputs.metadata_revision }}
persist-credentials: false
- name: Build with spksrc
run: |
Expand All @@ -142,6 +160,7 @@ jobs:
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
ref: ${{ needs.image.outputs.metadata_revision }}
persist-credentials: false
- name: Build with QDK
run: |
Expand Down Expand Up @@ -176,6 +195,7 @@ jobs:
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
ref: ${{ needs.image.outputs.metadata_revision }}
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
Expand Down
4 changes: 2 additions & 2 deletions desktop/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
minSdk 24
targetSdk 36
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
versionCode Integer.parseInt(System.getenv('ROMARR_ANDROID_VERSION_CODE') ?: '14')
versionName (System.getenv('ROMARR_ANDROID_VERSION') ?: '1.16.0')
versionCode Integer.parseInt(System.getenv('ROMARR_ANDROID_VERSION_CODE') ?: '15')
versionName (System.getenv('ROMARR_ANDROID_VERSION') ?: '1.16.1')
ndk { abiFilters 'arm64-v8a', 'x86_64' }
}
signingConfigs {
Expand Down
2 changes: 1 addition & 1 deletion desktop/windows/ROMarr.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<OutputType>WinExe</OutputType><TargetFramework>net10.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms><ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable><AssemblyName>ROMarr</AssemblyName><RootNamespace>ROMarr.Desktop</RootNamespace>
<Version>1.16.0</Version><Product>ROMarr</Product><Company>MoveWeight</Company>
<Version>1.16.1</Version><Product>ROMarr</Product><Company>MoveWeight</Company>
<Description>Find, verify and organize your game library.</Description>
<RuntimeIdentifier>win-x64</RuntimeIdentifier><SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile><IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
Expand Down
3 changes: 2 additions & 1 deletion tests/test_nas_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,10 @@ def test_the_image_smoke_test_mounts_as_a_puid_user():

def test_nas_smoke_tests_wait_for_the_image_they_run():
jobs = re.split(r"\n (?=\S)", read(ROOT / ".github/workflows/nas-packages.yml"))
for name in ("compose:", "qnap:", "asustor:"):
for name in ("compose:", "synology:", "qnap:", "asustor:"):
job = next(j for j in jobs if j.startswith(name))
assert "needs: image" in job, name
assert "ref: ${{ needs.image.outputs.metadata_revision }}" in job, name
image = next(j for j in jobs if j.startswith("image:"))
assert "QPKG_VER" in image and "/v2/blizzhacker/romarr/manifests/$version" in image
assert "github.event_name == 'release' && '60'" in image
Expand Down
Loading