CI: migrate release workflow from GitHub Actions to Forgejo Actions
All checks were successful
Mirror to GitHub / mirror (push) Successful in 2s
All checks were successful
Mirror to GitHub / mirror (push) Successful in 2s
GitHub Actions self-hosted runners need per-repo registration on a personal account; Forgejo Actions' runner already serves every repo with zero setup. Moves release publishing there (dl.breadway.dev stays the primary bakery target; GitHub release upload is kept as the fallback via an explicit token, since Forgejo Actions has no ambient GITHUB_TOKEN) and adds a mirror workflow to keep GitHub in sync automatically.
This commit is contained in:
parent
7ece4fd762
commit
6385a080f1
4 changed files with 64 additions and 70 deletions
|
|
@ -14,8 +14,6 @@ jobs:
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
git clone --mirror "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" repo.git
|
git clone --mirror "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" repo.git
|
||||||
cd repo.git
|
cd repo.git
|
||||||
# Mirror only branches and tags (not refs/pull/*, which GitHub rejects);
|
|
||||||
# --prune deletes GitHub refs that no longer exist on Forgejo.
|
|
||||||
git push --prune \
|
git push --prune \
|
||||||
"https://x-access-token:${{ secrets.MIRROR_TOKEN }}@github.com/Breadway/breadbox.git" \
|
"https://x-access-token:${{ secrets.MIRROR_TOKEN }}@github.com/Breadway/breadbox.git" \
|
||||||
'+refs/heads/*:refs/heads/*' '+refs/tags/*:refs/tags/*'
|
'+refs/heads/*:refs/heads/*' '+refs/tags/*:refs/tags/*'
|
||||||
|
|
|
||||||
59
.forgejo/workflows/release.yml
Normal file
59
.forgejo/workflows/release.yml
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
name: release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: ["v*"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: [self-hosted, hestia]
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
rm -rf src && mkdir src
|
||||||
|
git clone --branch "${GITHUB_REF_NAME}" --depth 1 \
|
||||||
|
"https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
run: cd src && cargo build --release --locked
|
||||||
|
|
||||||
|
- name: prepare artifacts
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
VERSION="${GITHUB_REF_NAME#v}"
|
||||||
|
PKG_DIR="/srv/breadway-dl/breadbox/${VERSION}"
|
||||||
|
mkdir -p "${PKG_DIR}"
|
||||||
|
for bin in breadbox breadbox-sync; do
|
||||||
|
cp "src/target/release/${bin}" "${PKG_DIR}/${bin}-x86_64"
|
||||||
|
strip "${PKG_DIR}/${bin}-x86_64"
|
||||||
|
sha256sum "${PKG_DIR}/${bin}-x86_64" | awk '{print $1}' \
|
||||||
|
> "${PKG_DIR}/${bin}-x86_64.sha256"
|
||||||
|
done
|
||||||
|
cp src/packaging/breadbox-sync.service "${PKG_DIR}/"
|
||||||
|
cp src/config.example.toml "${PKG_DIR}/"
|
||||||
|
cp src/bakery.toml "${PKG_DIR}/bakery.toml"
|
||||||
|
ln -sfn "${VERSION}" "/srv/breadway-dl/breadbox/latest"
|
||||||
|
|
||||||
|
- name: regenerate index.json
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
rm -rf /tmp/bread-ecosystem-ci
|
||||||
|
git clone https://git.breadway.dev/Breadway/bread-ecosystem.git /tmp/bread-ecosystem-ci
|
||||||
|
bash /tmp/bread-ecosystem-ci/scripts/gen-index.sh
|
||||||
|
|
||||||
|
- name: upload to GitHub Release
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
VERSION="${GITHUB_REF_NAME#v}"
|
||||||
|
PKG_DIR="/srv/breadway-dl/breadbox/${VERSION}"
|
||||||
|
gh release create "${GITHUB_REF_NAME}" --repo Breadway/breadbox \
|
||||||
|
--title "breadbox v${VERSION}" --generate-notes 2>/dev/null || true
|
||||||
|
gh release upload "${GITHUB_REF_NAME}" --repo Breadway/breadbox \
|
||||||
|
"${PKG_DIR}/breadbox-x86_64" \
|
||||||
|
"${PKG_DIR}/breadbox-sync-x86_64" \
|
||||||
|
"${PKG_DIR}/breadbox-x86_64.sha256" \
|
||||||
|
"${PKG_DIR}/breadbox-sync-x86_64.sha256" \
|
||||||
|
--clobber
|
||||||
63
.github/workflows/release.yml
vendored
63
.github/workflows/release.yml
vendored
|
|
@ -1,63 +0,0 @@
|
||||||
name: release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags: ["v*"]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
DL_DIR: /srv/breadway-dl
|
|
||||||
ECOSYSTEM_DIR: /tmp/bread-ecosystem-ci
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: [self-hosted, hestia]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: install build deps
|
|
||||||
run: sudo apt-get install -y libgtk-4-dev librsvg2-dev libdbus-1-dev pkg-config 2>/dev/null || true
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
run: cargo build --release --locked
|
|
||||||
|
|
||||||
- name: prepare artifacts
|
|
||||||
run: |
|
|
||||||
VERSION="${GITHUB_REF_NAME#v}"
|
|
||||||
PKG_DIR="${DL_DIR}/breadbox/${VERSION}"
|
|
||||||
mkdir -p "${PKG_DIR}"
|
|
||||||
for bin in breadbox breadbox-sync; do
|
|
||||||
cp "target/release/${bin}" "${PKG_DIR}/${bin}-x86_64"
|
|
||||||
strip "${PKG_DIR}/${bin}-x86_64"
|
|
||||||
sha256sum "${PKG_DIR}/${bin}-x86_64" | awk '{print $1}' \
|
|
||||||
> "${PKG_DIR}/${bin}-x86_64.sha256"
|
|
||||||
done
|
|
||||||
cp packaging/breadbox-sync.service "${PKG_DIR}/"
|
|
||||||
cp config.example.toml "${PKG_DIR}/"
|
|
||||||
cp bakery.toml "${PKG_DIR}/bakery.toml"
|
|
||||||
ln -sfn "${VERSION}" "${DL_DIR}/breadbox/latest"
|
|
||||||
|
|
||||||
- name: ensure bread-ecosystem
|
|
||||||
run: |
|
|
||||||
rm -rf "${ECOSYSTEM_DIR}"
|
|
||||||
git clone https://github.com/Breadway/bread-ecosystem.git "${ECOSYSTEM_DIR}"
|
|
||||||
|
|
||||||
- name: regenerate index.json
|
|
||||||
run: bash "${ECOSYSTEM_DIR}/scripts/gen-index.sh"
|
|
||||||
|
|
||||||
- name: upload to GitHub Release
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
VERSION="${GITHUB_REF_NAME#v}"
|
|
||||||
PKG_DIR="${DL_DIR}/breadbox/${VERSION}"
|
|
||||||
gh release create "${GITHUB_REF_NAME}" \
|
|
||||||
--title "breadbox v${VERSION}" --generate-notes 2>/dev/null || true
|
|
||||||
gh release upload "${GITHUB_REF_NAME}" \
|
|
||||||
"${PKG_DIR}/breadbox-x86_64" \
|
|
||||||
"${PKG_DIR}/breadbox-sync-x86_64" \
|
|
||||||
"${PKG_DIR}/breadbox-x86_64.sha256" \
|
|
||||||
"${PKG_DIR}/breadbox-sync-x86_64.sha256" \
|
|
||||||
--clobber
|
|
||||||
10
README.md
10
README.md
|
|
@ -12,7 +12,8 @@ breadbox GTK4 layer-shell launcher
|
||||||
|
|
||||||
- Layer-shell window, centered 600 px wide, keyboard-exclusive
|
- Layer-shell window, centered 600 px wide, keyboard-exclusive
|
||||||
- Reads the active Hyprland workspace and sorts apps by context priority
|
- Reads the active Hyprland workspace and sorts apps by context priority
|
||||||
- Fuzzy filtering as you type; Enter launches, Escape closes
|
- Launch history: non-priority apps sort by most-launched first, then alphabetically
|
||||||
|
- Fuzzy filtering as you type; Enter or click to launch, Escape or click outside to close
|
||||||
- App icons loaded from the resolved icon cache (see `breadbox-sync`)
|
- App icons loaded from the resolved icon cache (see `breadbox-sync`)
|
||||||
- pywal palette auto-detected from `~/.cache/wal/colors.json`, falls back to Catppuccin Mocha
|
- pywal palette auto-detected from `~/.cache/wal/colors.json`, falls back to Catppuccin Mocha
|
||||||
- User CSS override at `~/.config/breadbox/style.css`
|
- User CSS override at `~/.config/breadbox/style.css`
|
||||||
|
|
@ -88,10 +89,9 @@ breadbox-sync
|
||||||
```
|
```
|
||||||
|
|
||||||
Icon resolution order:
|
Icon resolution order:
|
||||||
1. System icon theme (`~/.local/share/icons`, `/usr/share/icons`, `/usr/share/pixmaps`) — 64 px > 48 px PNG, then SVG
|
1. System icon theme (`~/.local/share/icons`, `/usr/share/icons`, `/usr/share/pixmaps`) — 64 px > 48 px > 128 px > 32 px > 256 px PNG, then SVG
|
||||||
2. Flathub media server — for reverse-DNS app IDs (e.g. `org.gnome.Gedit`)
|
2. Flathub appstream CDN — for reverse-DNS app IDs (e.g. `org.gnome.Gedit`)
|
||||||
3. icon.horse — downloaded and cached
|
3. `application-x-executable` fallback from system theme
|
||||||
4. `application-x-executable` fallback from system theme
|
|
||||||
|
|
||||||
### Systemd service (run on login)
|
### Systemd service (run on login)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue