Skip to content

Commit

Permalink
ci: more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
silv3rr committed Jul 6, 2023
1 parent d8228ac commit c056fd3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
pip3 install --upgrade pip wheel setuptools
pip3 install -r requirements.txt
pip3 install pyinstaller sysv-ipc geoip2
./build.sh && mkdir ./build-ubuntu && mv -f *.tar.gz *.sha512sum ./build-ubuntu
- uses: actions/upload-artifact@v3
with:
name: build-ubuntu-artifacts
Expand Down Expand Up @@ -98,10 +99,7 @@ jobs:
pip3 install --upgrade pip wheel setuptools
pip3 install -r requirements.txt
pip3 install pyinstaller sysv-ipc geoip2
./build.sh && mkdir ./build-centos && mv -f *.tar.gz *.sha512sum ./build-centos
# git config --global user.name "${{ env.GIT_USER_NAME }}"
# git config --global user.email "${{ env.GIT_USER_EMAIL }}"
# git pull && git add bin && git commit -m "update centos binary" && git push
./build.sh && mkdir ./build-centos && mv -f *.tar.gz *.sha512sum ./build-centos
- uses: actions/upload-artifact@v2
with:
name: build-centos-artifacts
Expand All @@ -120,6 +118,7 @@ jobs:
path: build-artifacts
- name: Create gh release using 'hub'
run: |
echo "adding.. $(find -type f -printf '-a %p ')"
hub release create $(find -type f -printf '-a %p ') slv-pyspy-v$(date +%Y%m%d) -F - <<'#####'
pyspy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push image
run: |
docker push ghcr.io/silv3rr/pyspy:latest
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# syntax=docker/dockerfile:1
FROM python:3.9.17-bookworm
WORKDIR /app
COPY requirements.txt requirements.txt
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3013
RUN pip3 install --no-cache-dir -r requirements.txt && \
pip3 install --no-cache-dir geoip2 flask
COPY . .
ENTRYPOINT ["./spy.py"]
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
Shows users logged into glftpd either in a terminal window or as web page. Like 'gl_spy' and also simular to 'webspy' from foo-tools. Used to be included with [pywho](https://github.com/silv3rr/pywho) but is now its own separate thing.

_cli mode_

![screenshot_cli](docs/cli.png)

_web mode_

![screenshot_web](docs/web.png)

Here's some more [more screenshots](docs/Screenshots.md) and asciinema [demo](docs/Demo.md).
Expand Down Expand Up @@ -43,7 +45,7 @@ All files on [Releases](../../releases) tab

## docker

...
pyspy will be added to [docker-glftpd](https://github.com/silv3rr/docker-glftpd) soon(tm)

## apt

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ if [ "$PYINSTALLER" -eq 1 ]; then
ls -la dist/spy
if [ "$PACK" -eq 1 ]; then
. /etc/os-release
PACKNAME="pyspy-${ID:-linux}${VERSION_ID}-python${PYVER:-3}-x86_x64"
PACKNAME="slv-pyspy-${ID:-linux}${VERSION_ID}-python${PYVER:-3}-x86_x64"
printf "Creating %s.tar.gz...\n" "$PACKNAME"
tar -C ./dist -cvf "${PACKNAME}.tar.gz" spy >/dev/null &&
sha512sum "${PACKNAME}.tar.gz" >"${PACKNAME}.sha512sum" && echo "shasum: OK" || echo "ERROR: shasum"
Expand Down

0 comments on commit c056fd3

Please sign in to comment.