Compare commits

...
Author SHA1 Message Date
7e82dedfaf wip: move to forgejo actions
All checks were successful
Release / Build gatus with pre-packaged web assets (push) Successful in 2m46s
2026-08-18 21:39:53 +02:00
a5413ccd14 ci: test forgejo runner
Some checks failed
Release / Build gatus with pre-packaged web assets (push) Has been cancelled
2026-08-18 18:13:48 +02:00
c5951866d4 release: 2026.07.28 2026-07-28 18:40:53 +02:00
97bd46d665 meta: Pull latest changes 2026-07-28 18:40:48 +02:00
013735150d release: 2026.07.27 2026-07-27 15:12:06 +02:00
fee593840e fix: /run/gatus is created by systemd service on every boot 2026-07-27 15:11:43 +02:00
69f4a3198a release: 2026.07.18 2026-07-18 18:43:41 +02:00
d358c0ad7e fix: Proxy badge/uptime requests 2026-07-18 18:43:20 +02:00
2af6069798 release: 2026.07.18 2026-07-18 14:38:26 +02:00
8c6bd4f008 fix: Forgot one line in rebase 2026-07-18 14:38:05 +02:00
77bc93f3f3 release: 2026.07.13 2026-07-13 20:08:15 +02:00
4093328ac7 fix: Prevent remote-remote endpoints 2026-07-13 20:08:02 +02:00
aeeee0612e release: 2026.07.13 2026-07-13 19:01:34 +02:00
6d224e81f1 feat: Add release.sh 2026-07-13 19:01:26 +02:00
727b1a604c feat: Allow remote-only configs 2026-07-13 19:01:00 +02:00
6956226761 feat: Add update.sh to pick latest commit 2026-07-11 15:41:26 +02:00
7d95385b25 feat: Enable /run/gatus.socket socket instead of default port 2026-07-11 11:42:28 +02:00
7 changed files with 76 additions and 26 deletions

View file

@ -1,10 +1,10 @@
name: Release
env:
PKG_VERSION: "2026.07.10-1"
PKG_VERSION: "2026.07.28"
# TODO: actions/checkout only supports GITHUB repos...
GATUS_REPO: "selfhoster1312/gatus"
GATUS_REF: "fork"
GATUS_REPO: "https://github.com/selfhoster1312/gatus"
GATUS_REF: "d65a3321f1291aa419870a04896aa65fc4c78cf4"
# Preview mode: Publishes the build output as a CI artifact instead of creating
# a release, allowing for manual inspection of the output. This mode is
# activated if the CI run was triggered by events other than pushed tags, or
@ -24,7 +24,6 @@ on:
- '.github/workflows/release.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
@ -33,17 +32,18 @@ permissions:
jobs:
build:
name: Build gatus with pre-packaged web assets
runs-on: ubuntu-22.04
runs-on: docker
steps:
- name: Checkout sources
uses: actions/checkout@v7
with:
repository: "${{ env.GATUS_REPO }}"
ref: "${{ env.GATUS_REF }}"
- name: Copy source repo
run: |
git clone "${{ env.GATUS_REPO }}" .
git checkout "${{ env.GATUS_REF }}"
- name: Checkout sources for packaging
uses: actions/checkout@v7
with:
path: "__CI_PREBUILD__"
run: |
git clone "${{ forgejo.server_url }}/${{ forgejo.repository }}" __CI_PREBUILD__
cd __CI_PREBUILD__
git checkout "${{ forgejo.sha }}"
cd ..
- uses: actions/setup-go@v6
with:
go-version: 1.26.3
@ -56,7 +56,7 @@ jobs:
go build -o dist/gatus-amd64
cp dist/gatus-amd64 __CI_PREBUILD__/debian/gatus/usr/local/bin/gatus
- name: Build deb for amd64
uses: jiro4989/build-deb-action@86e86ceb88b13157fa569663d43c89346505fc3e
uses: https://github.com/jiro4989/build-deb-action@86e86ceb88b13157fa569663d43c89346505fc3e
with:
package: gatus
package_root: __CI_PREBUILD__/debian/gatus
@ -70,7 +70,7 @@ jobs:
GOARCH="arm64" go build -o dist/gatus-arm64
cp dist/gatus-arm64 __CI_PREBUILD__/debian/gatus/usr/local/bin/gatus
- name: Build deb for arm64
uses: jiro4989/build-deb-action@86e86ceb88b13157fa569663d43c89346505fc3e
uses: https://github.com/jiro4989/build-deb-action@86e86ceb88b13157fa569663d43c89346505fc3e
with:
package: gatus
package_root: __CI_PREBUILD__/debian/gatus
@ -79,8 +79,15 @@ jobs:
arch: arm64
id: build-deb-arm64
- name: Compute deb filename
run: |
cat <<EOF >>$GITHUB_ENV
ARM64_DEB_FILENAME=$(basename ${{ steps.build-deb-arm64.outputs.file_name }})
AMD64_DEB_FILENAME=$(basename ${{ steps.build-deb-amd64.outputs.file_name }})
EOF
- name: Upload binaries to release
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5
uses: actions/forgejo-release@v2.13.4
if: env.preview == 'false'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
@ -89,7 +96,7 @@ jobs:
tag: ${{ github.ref_name }}
overwrite: true
- name: Upload amd64 deb to release
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5
uses: actions/forgejo-release@v2.13.4
if: env.preview == 'false'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
@ -97,38 +104,40 @@ jobs:
tag: ${{ github.ref_name }}
overwrite: true
- name: Upload arm64 deb to release
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5
uses: actions/forgejo-release@v2.13.4
if: env.preview == 'false'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.build-deb-arm64.outputs.file_name }}
path: ${{ steps.build-deb-arm64.outputs.file_name }}
tag: ${{ github.ref_name }}
overwrite: true
- name: Upload gatus-amd64 as artifact
uses: actions/upload-artifact@v7
uses: https://code.forgejo.org/forgejo/upload-artifact@v3
if: env.preview == 'true'
with:
name: gatus-amd64
path: dist/gatus-amd64
archive: false
- name: Upload gatus-amd64 deb as artifact
uses: actions/upload-artifact@v7
uses: https://code.forgejo.org/forgejo/upload-artifact@v3
if: env.preview == 'true'
with:
name: ${{ env.AMD64_DEB_FILENAME }}
path: ${{ steps.build-deb-amd64.outputs.file_name }}
archive: false
- name: Upload gatus-arm64 as artifact
uses: actions/upload-artifact@v7
uses: https://code.forgejo.org/forgejo/upload-artifact@v3
if: env.preview == 'true'
with:
name: gatus-arm64
path: dist/gatus-arm64
archive: false
- name: Upload gatus-arm64 deb as artifact
uses: actions/upload-artifact@v7
uses: https://code.forgejo.org/forgejo/upload-artifact@v3
if: env.preview == 'true'
with:
name: ${{ env.ARM64_DEB_FILENAME }}
path: ${{ steps.build-deb-arm64.outputs.file_name }}
archive: false

View file

@ -1,3 +1,4 @@
adduser --group --system gatus
mkdir -p /var/lib/gatus
chown -R gatus: /var/lib/gatus
systemctl daemon-reload

1
debian/gatus/DEBIAN/postremove vendored Executable file
View file

@ -0,0 +1 @@
systemctl daemon-reload

View file

@ -1,6 +1,6 @@
use-privileged-ping: true
web:
port: 8081
socket: /run/gatus/gatus.sock
storage:
type: "sqlite"
path: "/var/lib/gatus/gatus.sqlite"

View file

@ -8,6 +8,8 @@ Requires=network-online.target
Type=exec
User=gatus
Group=gatus
RuntimeDirectory="gatus"
RuntimeDirectoryMode=0770
Environment=GATUS_CONFIG_PATH=/etc/gatus/gatus.yaml
ExecStart=/usr/local/bin/gatus
TimeoutStopSec=5s

25
release.sh Executable file
View file

@ -0,0 +1,25 @@
#! /usr/bin/env bash
set -euo pipefail
if ! test -z "$(git status --porcelain)"; then
echo "Please commit everything first"
exit 1
fi
# If we add -1 it's not recognized by the workflow as a release
date="$(date +'%Y.%m.%d')"
sed -i "s/PKG_VERSION: \".*\"/PKG_VERSION: \"$date\"/" .github/workflows/release.yml
git add .github/workflows/release.yml
releaseMsg="release: $date"
prevMsg="$(git log -1 --pretty=%B)"
if [[ "$prevMsg" = "$releaseMsg" ]]; then
git commit --amend -m "$releaseMsg"
else
git commit -m "$releaseMsg" --allow-empty
fi
git push --force
git tag "$date" --force
git push --tags --force

12
update.sh Executable file
View file

@ -0,0 +1,12 @@
#! /usr/bin/env bash
set -euo pipefail
GATUS_REPO="selfhoster1312/gatus"
GATUS_BRANCH="fork"
GATUS_REF="$(git ls-remote -b https://github.com/$GATUS_REPO refs/heads/$GATUS_BRANCH | cut -f1)"
echo "Updating to latest commit on $GATUS_REPO branch $GATUS_BRANCH: $GATUS_REF"
sed -i "s,GATUS_REPO: ".*",GATUS_REPO: \"$GATUS_REPO\"," .github/workflows/release.yml
sed -i "s,GATUS_REF: ".*",GATUS_REF: \"$GATUS_REF\"," .github/workflows/release.yml