From b6f6d63d61d452f4c1b2289422d3387742ab2f9e Mon Sep 17 00:00:00 2001 From: Yury Shvedov Date: Sun, 4 Feb 2024 13:22:57 +0300 Subject: [PATCH] [workflows] Fix error handling Previously errors in actions was ignored Change-Id: Ida263df740077926bcd8fd79a725f0cac447e59d --- .github/workflows/build.sh | 6 ++++-- .github/workflows/retrieve_version.sh | 4 +++- .github/workflows/update_packages.sh | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 7f6b457..ec4111b 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + if [ -f /etc/os-release ]; then . /etc/os-release OS=$NAME @@ -28,7 +30,7 @@ case $OS in setfacl -d --set u::rwx,g::rwx,o::- /home/build chown nobody . sudo -u nobody makepkg --log - + mkdir dist mv *.pkg.tar.zst dist @@ -45,4 +47,4 @@ case $OS in *) echo "Operating system is not recognized." ;; -esac \ No newline at end of file +esac diff --git a/.github/workflows/retrieve_version.sh b/.github/workflows/retrieve_version.sh index 9c9196d..c765f43 100644 --- a/.github/workflows/retrieve_version.sh +++ b/.github/workflows/retrieve_version.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + # get version VERSION=$(jq -r '.version' version_info.json) release_name="Beta $VERSION" @@ -8,4 +10,4 @@ tag_name="v$VERSION" #write variables to github env echo "VERSION=$VERSION" >> $GITHUB_ENV echo "release_name=$release_name" >> $GITHUB_ENV -echo "tag_name=$tag_name" >> $GITHUB_ENV \ No newline at end of file +echo "tag_name=$tag_name" >> $GITHUB_ENV diff --git a/.github/workflows/update_packages.sh b/.github/workflows/update_packages.sh index 7c8b11c..fa5c6b6 100644 --- a/.github/workflows/update_packages.sh +++ b/.github/workflows/update_packages.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + if [ -f /etc/os-release ]; then . /etc/os-release OS=$NAME @@ -20,4 +22,4 @@ case $OS in *) echo "Operating system is not recognized." ;; -esac \ No newline at end of file +esac