fix: add env variables
This commit is contained in:
@@ -25,6 +25,13 @@ Install the Git server called Gitea.
|
||||
# Display commands and exit on error
|
||||
set -xe
|
||||
|
||||
# Set environment variables
|
||||
export ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
|
||||
export GITEA_BINARY=gitea-1.25.5-linux-$ARCH
|
||||
export GITEA_LUGIT_THEME=gitea-lugit-theme
|
||||
export GITEA_WORK_DIR=/var/lib/gitea
|
||||
export ACTRUNNER_BINARY=act_runner-0.3.0-linux-$ARCH
|
||||
|
||||
# Create gitea user
|
||||
if ! id gitea >/dev/null 2>&1; then
|
||||
useradd --base-dir %{_sharedstatedir} --create-home --shell $SHELL --system gitea
|
||||
@@ -35,8 +42,6 @@ usermod --groups postgres,valkey --append gitea
|
||||
printf 'export GITEA_WORK_DIR=%{_sharedstatedir}/gitea\n' >> %{_sharedstatedir}/gitea/.bash_profile
|
||||
|
||||
# Download and install gitea binary
|
||||
export ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
|
||||
export GITEA_BINARY=gitea-1.25.5-linux-$ARCH
|
||||
wget --output-document $GITEA_BINARY https://dl.gitea.com/gitea/1.25.5/$GITEA_BINARY
|
||||
wget --output-document $GITEA_BINARY.asc https://dl.gitea.com/gitea/1.25.5/$GITEA_BINARY.asc
|
||||
gpg --keyserver hkps://keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
|
||||
@@ -55,7 +60,6 @@ chmod 640 %{_sysconfdir}/gitea/app.ini
|
||||
chown root:gitea %{_sysconfdir}/gitea/app.ini
|
||||
|
||||
# Add lugit theme
|
||||
export GITEA_LUGIT_THEME=gitea-lugit-theme
|
||||
wget --output-document %{_tmppath}/$GITEA_LUGIT_THEME.tar.gz https://github.com/lucas-labs/gitea-lugit-theme/releases/download/v1.0.1/$GITEA_LUGIT_THEME.tar.gz
|
||||
runuser --user=gitea -- tar --extract --gzip --overwrite --directory=%{_sharedstatedir}/gitea/custom --file %{_tmppath}/$GITEA_LUGIT_THEME.tar.gz
|
||||
rm %{_tmppath}/$GITEA_LUGIT_THEME.tar.gz
|
||||
@@ -76,7 +80,6 @@ if ! runuser --user=gitea -- gitea admin user list | grep --quiet samuel; then
|
||||
fi
|
||||
|
||||
# Download and install act_runner binary
|
||||
export ACTRUNNER_BINARY=act_runner-0.3.0-linux-$ARCH
|
||||
wget --output-document $ACTRUNNER_BINARY.xz https://gitea.com/gitea/act_runner/releases/download/v0.3.0/$ACTRUNNER_BINARY.xz
|
||||
wget --output-document $ACTRUNNER_BINARY.xz.sha256 https://gitea.com/gitea/act_runner/releases/download/v0.3.0/$ACTRUNNER_BINARY.xz.sha256
|
||||
cat $ACTRUNNER_BINARY.xz.sha256 | sha256sum --check --status
|
||||
|
||||
Reference in New Issue
Block a user