mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2025-04-17 14:23:44 +03:00
Update packages script
This commit is contained in:
parent
cd5016dc01
commit
493ba59fc4
29
.github/update_packages.yml
vendored
Normal file
29
.github/update_packages.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: Update packages
|
||||
|
||||
# Controls when the action will run. Workflow runs when manually triggered using the UI
|
||||
# or API.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update_packages:
|
||||
runs-on: archlinux:latest
|
||||
|
||||
steps:
|
||||
- name: Check and update current packages
|
||||
run: sh .github/workflows/update_packages.sh
|
||||
- name: Save tag name
|
||||
run: echo "TAG_NAME=v$(jq -r .version ./version_info.json)" >> $GITHUB_ENV
|
||||
- name: Save version name (Beta x.x.x)
|
||||
run: echo "VERSION_NAME=Beta $(jq -r .version ./version_info.json)" >> $GITHUB_ENV
|
||||
- name: Commit and push changes
|
||||
uses: EndBug/add-and-commit@v9.1.4
|
||||
with:
|
||||
message: "Update packages to ${{ env.VERSION_NAME }}"
|
||||
add: "."
|
||||
author_name: "GitHub Actions"
|
||||
author_email: "loraner123@gmail.com"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
tag_push: '--force'
|
||||
|
||||
|
23
.github/workflows/update_packages.sh
vendored
Normal file
23
.github/workflows/update_packages.sh
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
OS=$NAME
|
||||
elif [ -f /etc/lsb-release ]; then
|
||||
. /etc/lsb-release
|
||||
OS=$DISTRIB_ID
|
||||
else
|
||||
OS=$(uname -s)
|
||||
fi
|
||||
|
||||
case $OS in
|
||||
"Arch Linux")
|
||||
echo "Arch Linux"
|
||||
pacman -Syy --noconfirm
|
||||
pacman -S --noconfirm git sudo base-devel jq
|
||||
sh ./generate_packages.sh
|
||||
;;
|
||||
*)
|
||||
echo "Operating system is not recognized."
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user