chore: move {bazaar,fastfetch-}user-count (#1680)
* chore: move {bazaar,fastfetch-}user-count
This allows us to disable networking in 00-image-info.sh completely
* chore: only gh token for scripts that need it
This commit is contained in:
parent
becd3e5cb7
commit
de62d86d31
3 changed files with 10 additions and 11 deletions
|
|
@ -42,16 +42,15 @@ ARG IMAGE_FLAVOR=""
|
|||
RUN --mount=type=tmpfs,dst=/boot \
|
||||
--mount=type=bind,from=ctx,source=/,target=/ctx \
|
||||
--mount=type=cache,dst=/var/cache/libdnf5 \
|
||||
--mount=type=secret,id=GITHUB_TOKEN \
|
||||
/ctx/build_files/shared/build.sh
|
||||
|
||||
# so ghcurl wrapper is available to all later RUNs
|
||||
ENV PATH="/tmp/scripts/helpers:${PATH}"
|
||||
|
||||
# Generate image-info.json, os-release
|
||||
RUN --mount=type=tmpfs,dst=/boot \
|
||||
RUN --network=none \
|
||||
--mount=type=tmpfs,dst=/boot \
|
||||
--mount=type=bind,from=ctx,source=/,target=/ctx \
|
||||
--mount=type=secret,id=GITHUB_TOKEN \
|
||||
/ctx/build_files/base/00-image-info.sh
|
||||
|
||||
# Install Kernel and Akmods
|
||||
|
|
|
|||
|
|
@ -62,12 +62,4 @@ echo "IMAGE_VERSION=\"${VERSION}\"" >> /usr/lib/os-release
|
|||
# Fix issues caused by ID no longer being fedora
|
||||
sed -i "s|^EFIDIR=.*|EFIDIR=\"fedora\"|" /usr/sbin/grub2-switch-to-blscfg
|
||||
|
||||
# Weekly user count for fastfetch
|
||||
ghcurl https://raw.githubusercontent.com/ublue-os/countme/main/badge-endpoints/aurora.json | jq -r ".message" > /usr/share/ublue-os/fastfetch-user-count
|
||||
|
||||
# bazaar weekly downloads used for fastfetch
|
||||
curl -X 'GET' \
|
||||
'https://flathub.org/api/v2/stats/io.github.kolunmi.Bazaar?all=false&days=1' \
|
||||
-H 'accept: application/json' | jq -r ".installs_last_7_days" | numfmt --to=si --round=nearest > /usr/share/ublue-os/bazaar-install-count
|
||||
|
||||
echo "::endgroup::"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,14 @@ ghcurl "https://github.com/ublue-os/aurora-docs/releases/download/0.1/aurora.pdf
|
|||
install -Dm0644 -t /usr/share/doc/aurora/ /tmp/aurora.pdf
|
||||
cp /usr/share/applications/dev.getaurora.aurora-docs.desktop /usr/share/kglobalaccel/
|
||||
|
||||
# Weekly user count for fastfetch
|
||||
ghcurl https://raw.githubusercontent.com/ublue-os/countme/main/badge-endpoints/aurora.json | jq -r ".message" > /usr/share/ublue-os/fastfetch-user-count
|
||||
|
||||
# bazaar weekly downloads used for fastfetch
|
||||
curl -X 'GET' \
|
||||
'https://flathub.org/api/v2/stats/io.github.kolunmi.Bazaar?all=false&days=1' \
|
||||
-H 'accept: application/json' | jq -r ".installs_last_7_days" | numfmt --to=si --round=nearest > /usr/share/ublue-os/bazaar-install-count
|
||||
|
||||
# Starship Shell Prompt
|
||||
ghcurl "https://github.com/starship/starship/releases/latest/download/starship-$(uname -m)-unknown-linux-gnu.tar.gz" --retry 3 -o /tmp/starship.tar.gz
|
||||
ghcurl "https://github.com/starship/starship/releases/latest/download/starship-$(uname -m)-unknown-linux-gnu.tar.gz.sha256" --retry 3 -o /tmp/starship.tar.gz.sha256
|
||||
|
|
|
|||
Loading…
Reference in a new issue