Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a04dae471 | |||
| fd82cc234b | |||
| 92c503ad84 | |||
| f5d267c08a | |||
| 4eddb19d59 |
@@ -1,10 +1,10 @@
|
|||||||
name: Build Debian Packages
|
name: Build Debian Packages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
# APT publishing is release-driven: we build + publish only on `v*` tag
|
||||||
|
# pushes. PRs into master still build the .debs as a sanity check (no
|
||||||
|
# publish). Manual dispatch is kept as an escape hatch.
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- feature/debian-packaging
|
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- "v*"
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -231,7 +231,9 @@ jobs:
|
|||||||
name: Publish to APT Repository
|
name: Publish to APT Repository
|
||||||
needs: combine-artifacts
|
needs: combine-artifacts
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
|
# Publish only on `v*` release tags — keep gh-pages stable between
|
||||||
|
# releases instead of overwriting same-version .debs on every commit.
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
@@ -314,8 +316,19 @@ jobs:
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- name: Set GPG available flag
|
||||||
|
id: check_gpg
|
||||||
|
env:
|
||||||
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
run: |
|
||||||
|
if [ -n "$GPG_PRIVATE_KEY" ]; then
|
||||||
|
echo "available=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "available=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
if: secrets.GPG_PRIVATE_KEY != ''
|
if: steps.check_gpg.outputs.available == 'true'
|
||||||
env:
|
env:
|
||||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
run: |
|
run: |
|
||||||
@@ -323,29 +336,31 @@ jobs:
|
|||||||
gpg --list-secret-keys
|
gpg --list-secret-keys
|
||||||
|
|
||||||
- name: Sign repository
|
- name: Sign repository
|
||||||
if: secrets.GPG_PRIVATE_KEY != ''
|
if: steps.check_gpg.outputs.available == 'true'
|
||||||
env:
|
env:
|
||||||
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
|
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
|
||||||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
run: |
|
run: |
|
||||||
if [ -n "$GPG_PASSPHRASE" ]; then
|
if [ -n "$GPG_PASSPHRASE" ]; then
|
||||||
echo "$GPG_PASSPHRASE" | gpg --batch --yes --passphrase-fd 0 \
|
echo "$GPG_PASSPHRASE" | gpg --batch --yes --no-tty --pinentry-mode loopback --passphrase-fd 0 \
|
||||||
--default-key "$GPG_KEY_ID" \
|
--default-key "$GPG_KEY_ID" \
|
||||||
-abs -o dists/stable/Release.gpg dists/stable/Release
|
-abs -o dists/stable/Release.gpg dists/stable/Release
|
||||||
echo "$GPG_PASSPHRASE" | gpg --batch --yes --passphrase-fd 0 \
|
echo "$GPG_PASSPHRASE" | gpg --batch --yes --no-tty --pinentry-mode loopback --passphrase-fd 0 \
|
||||||
--default-key "$GPG_KEY_ID" \
|
--default-key "$GPG_KEY_ID" \
|
||||||
--clearsign -o dists/stable/InRelease dists/stable/Release
|
--clearsign -o dists/stable/InRelease dists/stable/Release
|
||||||
else
|
else
|
||||||
gpg --batch --yes --default-key "$GPG_KEY_ID" \
|
gpg --batch --yes --no-tty --pinentry-mode loopback \
|
||||||
|
--default-key "$GPG_KEY_ID" \
|
||||||
-abs -o dists/stable/Release.gpg dists/stable/Release
|
-abs -o dists/stable/Release.gpg dists/stable/Release
|
||||||
gpg --batch --yes --default-key "$GPG_KEY_ID" \
|
gpg --batch --yes --no-tty --pinentry-mode loopback \
|
||||||
|
--default-key "$GPG_KEY_ID" \
|
||||||
--clearsign -o dists/stable/InRelease dists/stable/Release
|
--clearsign -o dists/stable/InRelease dists/stable/Release
|
||||||
fi
|
fi
|
||||||
gpg --armor --export "$GPG_KEY_ID" > KEY.gpg
|
gpg --armor --export "$GPG_KEY_ID" > KEY.gpg
|
||||||
echo "✓ Repository signed"
|
echo "✓ Repository signed"
|
||||||
|
|
||||||
- name: Create unsigned repository notice
|
- name: Create unsigned repository notice
|
||||||
if: secrets.GPG_PRIVATE_KEY == ''
|
if: steps.check_gpg.outputs.available == 'false'
|
||||||
run: |
|
run: |
|
||||||
echo "⚠️ Warning: GPG_PRIVATE_KEY not set. Repository will be UNSIGNED."
|
echo "⚠️ Warning: GPG_PRIVATE_KEY not set. Repository will be UNSIGNED."
|
||||||
echo "⚠️ Add GPG secrets to sign the repository automatically."
|
echo "⚠️ Add GPG secrets to sign the repository automatically."
|
||||||
|
|||||||
@@ -29,27 +29,27 @@ cat <<EOF
|
|||||||
┌─────────────────────────────────────────────────────────────────────┐
|
┌─────────────────────────────────────────────────────────────────────┐
|
||||||
│ socktop-agent has been installed successfully! │
|
│ socktop-agent has been installed successfully! │
|
||||||
├─────────────────────────────────────────────────────────────────────┤
|
├─────────────────────────────────────────────────────────────────────┤
|
||||||
│ │
|
│ │
|
||||||
│ The systemd service has been installed but is NOT enabled by │
|
│ The systemd service has been installed but is NOT enabled by │
|
||||||
│ default. To enable and start the service: │
|
│ default. To enable and start the service: │
|
||||||
│ │
|
│ │
|
||||||
│ sudo systemctl enable --now socktop-agent │
|
│ sudo systemctl enable --now socktop-agent │
|
||||||
│ │
|
│ │
|
||||||
│ To start without enabling on boot: │
|
│ To start without enabling on boot: │
|
||||||
│ │
|
│ │
|
||||||
│ sudo systemctl start socktop-agent │
|
│ sudo systemctl start socktop-agent │
|
||||||
│ │
|
│ │
|
||||||
│ To check service status: │
|
│ To check service status: │
|
||||||
│ │
|
│ │
|
||||||
│ sudo systemctl status socktop-agent │
|
│ sudo systemctl status socktop-agent │
|
||||||
│ │
|
│ │
|
||||||
│ Default settings: │
|
│ Default settings: │
|
||||||
│ - Port: 3000 (use -p or --port to change) │
|
│ - Port: 3000 (use -p or --port to change) │
|
||||||
│ - SSL/TLS: disabled (use --enableSSL to enable) │
|
│ - SSL/TLS: disabled (use --enableSSL to enable) │
|
||||||
│ │
|
│ │
|
||||||
│ For more information, see: │
|
│ For more information, see: │
|
||||||
│ /usr/share/doc/socktop_agent/README.md │
|
│ /usr/share/doc/socktop_agent/README.md │
|
||||||
│ │
|
│ │
|
||||||
└─────────────────────────────────────────────────────────────────────┘
|
└─────────────────────────────────────────────────────────────────────┘
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user