0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2025-03-13 22:03:43 +03:00

Update packages script

fix

fix

fix

d

f
This commit is contained in:
Andrey Onishchenko 2024-02-02 18:45:51 +03:00
parent cd5016dc01
commit 15246ebc67
3 changed files with 63 additions and 1 deletions

View File

@ -6,7 +6,7 @@ on:
- '*'
push:
branches:
- 'master'
- '#master'
jobs:

23
.github/workflows/update_packages.sh vendored Normal file
View 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 -S --noconfirm git sudo base-devel jq nix
sh ./generate_packages.sh
git config --global --add safe.directory "*"
;;
*)
echo "Operating system is not recognized."
;;
esac

39
.github/workflows/update_packages.yml vendored Normal file
View File

@ -0,0 +1,39 @@
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:
strategy:
matrix:
container:
- archlinux:latest
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- name: Pacman database update
run: pacman -Syy --noconfirm
- name: Fix Git
run: pacman -S --noconfirm git
- name: Checkout
uses: actions/checkout@v4
- 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'