mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 02:59:53 +07:00
dc80125b75
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
#
|
|
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium>
|
|
#
|
|
# This is free software, licensed under the MIT License.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
name: Grub
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
push:
|
|
description: "push"
|
|
default: false
|
|
type: boolean
|
|
jobs:
|
|
grub:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@main
|
|
|
|
- name: Initialization environment
|
|
run : |
|
|
git config --global user.email "info@auxxxilium.tech"
|
|
git config --global user.name "AuxXxilium"
|
|
sudo timedatectl set-timezone "Europe/Berlin"
|
|
|
|
sudo apt update
|
|
sudo apt install -y autoconf automake autopoint gettext build-essential bison flex libtool dosfstools e2fsprogs
|
|
sudo apt install -y libfreetype6-dev unifont fonts-dejavu libfuse-dev liblzma-dev libzfslinux-dev
|
|
|
|
- name: Make Grub
|
|
run: |
|
|
. scripts/grub.sh "grub-2.12" "i386-pc i386-efi x86_64-efi"
|
|
|
|
- name: Check and Push
|
|
if: success() && inputs.push == true
|
|
run: |
|
|
if [ -f "grub.img.gz" ]; then
|
|
echo "Copy img ..."
|
|
mv -f grub.img.gz files/initrd/opt/arc/grub.img.gz
|
|
|
|
echo "Git push ..."
|
|
git pull
|
|
status=$(git status -s | grep -E 'grub.img.gz' | awk '{printf " %s", $2}')
|
|
if [ -n "${status}" ]; then
|
|
git add ${status}
|
|
git commit -m "grub: update $(date +%Y-%m-%d" "%H:%M:%S)"
|
|
git push -f
|
|
fi
|
|
else
|
|
echo "No change ..."
|
|
fi
|