Compare commits
2 Commits
4746a9b204
...
4e3f3f4eb1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e3f3f4eb1 | ||
|
|
cf4dbf1cf2 |
@@ -1,9 +1,5 @@
|
|||||||
name: OTA build
|
name: OTA build
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -52,35 +48,10 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
find dist/ota -maxdepth 1 -type f | sort
|
find dist/ota -maxdepth 1 -type f | sort
|
||||||
|
|
||||||
- name: Upload direct OTA files to Gitea Packages
|
- name: Upload direct OTA files
|
||||||
env:
|
uses: actions/upload-artifact@v7
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
with:
|
||||||
run: |
|
name: ota-files
|
||||||
set -eu
|
path: dist/ota/*
|
||||||
package_owner="${GITHUB_ACTOR}"
|
if-no-files-found: error
|
||||||
package_name="$(printf '%s' "${GITHUB_REPOSITORY#*/}" | tr '[:upper:]' '[:lower:]')-ota"
|
archive: false
|
||||||
package_version="${GITHUB_SHA}"
|
|
||||||
base_url="${GITHUB_SERVER_URL}/api/packages/${package_owner}/generic/${package_name}/${package_version}"
|
|
||||||
for file in dist/ota/*; do
|
|
||||||
[ -f "$file" ] || continue
|
|
||||||
curl --fail --silent --show-error --user "${GITHUB_ACTOR}:${GITEA_TOKEN}" --upload-file "$file" "${base_url}/$(basename "$file")"
|
|
||||||
echo "Uploaded $(basename "$file")"
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Verify uploaded OTA files
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
run: |
|
|
||||||
set -eu
|
|
||||||
package_owner="${GITHUB_ACTOR}"
|
|
||||||
package_name="$(printf '%s' "${GITHUB_REPOSITORY#*/}" | tr '[:upper:]' '[:lower:]')-ota"
|
|
||||||
package_version="${GITHUB_SHA}"
|
|
||||||
curl --fail --silent --show-error --user "${GITHUB_ACTOR}:${GITEA_TOKEN}" "${GITHUB_SERVER_URL}/api/v1/packages/${package_owner}/generic/${package_name}/${package_version}/files" > /tmp/package-files.json
|
|
||||||
python3 - <<'PY'
|
|
||||||
import json
|
|
||||||
from pathlib import Path
|
|
||||||
files = json.loads(Path('/tmp/package-files.json').read_text())
|
|
||||||
assert files, 'no package files returned'
|
|
||||||
for item in files:
|
|
||||||
print(item.get('name') or item.get('file_name') or item)
|
|
||||||
PY
|
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
actor namespace repro 2026-08-30T10:35:24-05:00
|
actor namespace repro 2026-08-30T10:35:24-05:00
|
||||||
post-registration trigger 2026-08-30T10:51:56-05:00
|
post-registration trigger 2026-08-30T10:51:56-05:00
|
||||||
|
artifact test 2026-08-30T10:56:34-05:00
|
||||||
|
|||||||
Reference in New Issue
Block a user