arc-dsm/.github/workflows/update.yml

73 lines
1.7 KiB
YAML
Raw Normal View History

#
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
name: Update
on:
workflow_dispatch:
inputs:
cleanfiles:
description: 'clean files'
default: false
type: boolean
jobs:
dsm-files:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Initialization environment
run : |
sudo git config --global user.email "info@auxxxilium.tech"
sudo git config --global user.name "AuxXxilium"
sudo timedatectl set-timezone "Europe/Berlin"
sudo apt update
sudo apt install -y \
jq \
build-essential \
libtool \
pkgconf \
libzstd-dev \
liblzma-dev \
libssl-dev \
gawk \
cpio \
gettext \
libelf-dev \
qemu-utils \
busybox \
dialog \
curl \
sed \
zip \
unzip \
python3
sudo snap install yq
- name: Clean Files
if: inputs.cleanfiles == true
run: |
sudo rm -rf ./files
sudo rm -rf ./dsm
- name: Update
run: |
sudo rm -rf ./tmp
sudo rm -rf ./configs
sudo rm -f ./configs.zip
sudo rm -f ./dsmdata.yml
sudo ./update.sh
- name: Check and Push
run: |
sudo git fetch
sudo git add .
sudo git commit -m "dsm: update $(date +%Y-%m-%d" "%H:%M:%S)"
sudo git push -f