mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-25 08:56:21 +00:00
Rename workflow for building AppImage release
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Build ProxMenux Monitor AppImage Manual
|
name: Build AppImage Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -14,8 +14,11 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout main
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v5
|
uses: actions/setup-node@v5
|
||||||
@@ -64,31 +67,17 @@ jobs:
|
|||||||
AppImage/dist/*.sha256
|
AppImage/dist/*.sha256
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- name: Commit AppImage to current branch
|
- name: Commit AppImage to main
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
CURRENT_BRANCH="${{ github.ref_name }}"
|
|
||||||
|
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
# Guardar los archivos compilados antes de tocar git
|
rm -f AppImage/*.AppImage AppImage/*.sha256 || true
|
||||||
mkdir -p /tmp/appimage-dist
|
cp AppImage/dist/*.AppImage AppImage/
|
||||||
cp AppImage/dist/*.AppImage /tmp/appimage-dist/
|
cp AppImage/dist/ProxMenux-Monitor.AppImage.sha256 AppImage/
|
||||||
cp AppImage/dist/ProxMenux-Monitor.AppImage.sha256 /tmp/appimage-dist/
|
|
||||||
|
|
||||||
# Limpiar cambios locales para evitar conflictos
|
|
||||||
git stash --include-untracked
|
|
||||||
|
|
||||||
git fetch origin "$CURRENT_BRANCH"
|
|
||||||
git worktree add /tmp/target-branch origin/"$CURRENT_BRANCH"
|
|
||||||
|
|
||||||
rm -f /tmp/target-branch/AppImage/*.AppImage /tmp/target-branch/AppImage/*.sha256 || true
|
|
||||||
cp /tmp/appimage-dist/*.AppImage /tmp/target-branch/AppImage/
|
|
||||||
cp /tmp/appimage-dist/ProxMenux-Monitor.AppImage.sha256 /tmp/target-branch/AppImage/
|
|
||||||
|
|
||||||
cd /tmp/target-branch
|
|
||||||
git add AppImage/*.AppImage AppImage/*.sha256
|
git add AppImage/*.AppImage AppImage/*.sha256
|
||||||
git commit -m "Update AppImage build ($(date +'%Y-%m-%d %H:%M:%S'))" || echo "No changes to commit"
|
git commit -m "Update AppImage release build ($(date +'%Y-%m-%d %H:%M:%S'))" || echo "No changes to commit"
|
||||||
git push origin HEAD:"$CURRENT_BRANCH"
|
git push origin main
|
||||||
Reference in New Issue
Block a user