fix(ci): initialise the published repo when its directory is empty
All checks were successful
Flatpak / flatpak (push) Successful in 25m45s
All checks were successful
Flatpak / flatpak (push) Successful in 25m45s
The publish step created the OSTree repo only when the directory was missing. On the runner host the web root exists before the first publish, as an empty directory, so the init was skipped and build-commit-from failed with `opendir(objects)`. The check now looks for the repo's config file. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
b55fe31ddf
commit
21746b188d
1 changed files with 3 additions and 1 deletions
|
|
@ -134,7 +134,9 @@ jobs:
|
|||
FLATPAK_GPG_KEY_ID=$(cat /run/crafter-flatpak/key-id)
|
||||
# The live repo is the canonical copy; builds are promoted into it,
|
||||
# never built into it.
|
||||
[ -d "$REPO_DIR" ] || ostree init --repo="$REPO_DIR" --mode=archive
|
||||
# Keyed on the repo's config file, not the directory: the web root
|
||||
# may exist as an empty directory before the first publish.
|
||||
[ -f "$REPO_DIR/config" ] || ostree init --repo="$REPO_DIR" --mode=archive
|
||||
flatpak build-commit-from --src-repo=repo \
|
||||
--gpg-sign="$FLATPAK_GPG_KEY_ID" --gpg-homedir="$GNUPGHOME" \
|
||||
"$REPO_DIR" "app/$APP_ID/x86_64/${{ steps.meta.outputs.branch }}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue