Compare commits

...

6 Commits

Author SHA1 Message Date
MahrWe
4e08aa983a
Merge 4bb27b0620 into f428146c47 2025-01-09 01:06:47 +01:00
community-scripts-pr-app[bot]
f428146c47
Update CHANGELOG.md (#1336)
Some checks are pending
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Validate script formatting / Check changed files (push) Waiting to run
Validate scripts / Check changed files (push) Waiting to run
2025-01-08 23:05:14 +01:00
Sébastiaan
0059adecf1
fix(ci): formatting event & chmod +x (#1335) 2025-01-08 21:41:58 +01:00
MahrWe
4bb27b0620
migration of .env to hoarder.env in hoarder.sh 2025-01-08 14:46:14 +01:00
MahrWe
0ad212400c
Update .env file location in hoarder.sh
No more need to move around the .env file
2025-01-08 14:31:08 +01:00
MahrWe
9533bc88b3
Update .env file location in hoarder-install.sh 2025-01-08 14:25:56 +01:00
5 changed files with 13 additions and 13 deletions

View File

@ -38,7 +38,7 @@ jobs:
- name: Get changed files
id: changed-files
run: |
if ${{ github.event_name == 'pull_request' }}; then
if ${{ github.event_name == 'pull_request_target' }}; then
echo "files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ steps.pr.outputs.result && fromJSON(steps.pr.outputs.result).merge_commit_sha }} | grep -E '\.(sh|func)$' | xargs)" >> $GITHUB_OUTPUT
else
echo "files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep -E '\.(sh|func)$' | xargs)" >> $GITHUB_OUTPUT
@ -70,7 +70,7 @@ jobs:
fi
- name: Post comment with results
if: always() && steps.changed-files.outputs.files != '' && github.event_name == 'pull_request'
if: always() && steps.changed-files.outputs.files != '' && github.event_name == 'pull_request_target'
uses: actions/github-script@v7
with:
script: |

View File

@ -33,10 +33,6 @@ jobs:
with:
fetch-depth: 0 # Ensure the full history is fetched for accurate diffing
ref: ${{ github.event_name == 'pull_request_target' && fromJSON(steps.pr.outputs.result).merge_commit_sha || '' }}
- name: Set execute permission for .sh files
run: |
chmod +x ct/*.sh
- name: Get changed files
id: changed-files

View File

@ -26,6 +26,7 @@ Do not break established syntax in this file, as it is automatically updated by
### 🧰 Maintenance
- fix(ci): formatting event & chmod +x [@se-bastiaan](https://github.com/se-bastiaan) ([#1335](https://github.com/community-scripts/ProxmoxVE/pull/1335))
- fix: correctly handle pull_request_target event [@se-bastiaan](https://github.com/se-bastiaan) ([#1327](https://github.com/community-scripts/ProxmoxVE/pull/1327))
## 2025-01-07

View File

@ -40,7 +40,10 @@ function update_script() {
msg_ok "Stopped Services"
msg_info "Updating ${APP} to v${RELEASE}"
cd /opt
mv /opt/hoarder/.env /opt/.env
if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then
mkdir -p /etc/hoarder
mv /opt/hoarder/.env /etv/hoarder/hoarder.env
fi
rm -rf /opt/hoarder
wget -q "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip"
unzip -q v${RELEASE}.zip
@ -54,8 +57,7 @@ function update_script() {
export DATA_DIR=/opt/hoarder_data
cd /opt/hoarder/packages/db
pnpm migrate &>/dev/null
mv /opt/.env /opt/hoarder/.env
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /opt/hoarder/.env
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env
msg_ok "Updated ${APP} to v${RELEASE}"
msg_info "Starting Services"
@ -79,4 +81,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"

View File

@ -78,7 +78,8 @@ $STD pnpm install --frozen-lockfile
export DATA_DIR=/opt/hoarder_data
HOARDER_SECRET=$(openssl rand -base64 36 | cut -c1-24)
cat <<EOF >/opt/hoarder/.env
mkdir -p /etc/hoarder
cat <<EOF >/etc/hoarder/hoarder.env
SERVER_VERSION=$RELEASE
NEXTAUTH_SECRET="$HOARDER_SECRET"
NEXTAUTH_URL="http://localhost:3000"
@ -129,7 +130,7 @@ After=network.target hoarder-workers.service
[Service]
ExecStart=pnpm start
WorkingDirectory=/opt/hoarder/apps/web
EnvironmentFile=/opt/hoarder/.env
EnvironmentFile=/etc/hoarder/hoarder.env
Restart=always
[Install]
@ -159,7 +160,7 @@ After=network.target hoarder-browser.service meilisearch.service
[Service]
ExecStart=pnpm start:prod
WorkingDirectory=/opt/hoarder/apps/workers
EnvironmentFile=/opt/hoarder/.env
EnvironmentFile=/etc/hoarder/hoarder.env
Restart=always
TimeoutStopSec=5