Skip to content

Commit

Permalink
Merge pull request #2 from gnostr-org/1706224043/ce8792f7/dde4560a
Browse files Browse the repository at this point in the history
.github/workflows/gnostr-docker.yml
  • Loading branch information
RandyMcMillan authored Jan 26, 2024
2 parents 7e350bb + d44524c commit 4a4762e
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 1 deletion.
54 changes: 54 additions & 0 deletions .github/workflows/gnostr-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: gnostr-docker

on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
pull_request:
branches:
- '*'
- '*/*'
- '**'
- 'master'
- 'main'
push:
branches:
- '*'
- '*/*'
- '**'
- 'master'
- 'main'

env:
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1

jobs:
build:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
tag: ["latest", "slim-bullseye"]
runs-on: ${{ matrix.os }}
container: rust:${{ matrix.tag }}

steps:
- run: apt-get update && apt-get install autoconf build-essential curl cmake jq libexpat1-dev libcurl4-openssl-dev libssl-dev libtool lsb-release git make nodejs npm pkg-config python3 python-is-python3 sudo tcl zlib1g-dev -y
## notice: this is a pre checkout step
## notice: additional operations can be done prior to checkout
## - run: apk update && apk add bash cmake git python3 && python3 -m ensurepip
- run: printenv
- name: checkout@v3 fetch-depth submodules set-safe-dir true
uses: actions/checkout@v3
with:
fetch-depth: '100'
submodules: 'true'
set-safe-directory: 'true'
## notice: these are post checkout steps
## - run: apk update && apk add autoconf automake build-base openssl-dev libtool make
- run: touch ~/GITHUB_TOKEN.txt
- run: touch ~/.bashrc
- run: git config --global --add safe.directory /__w/gnostr-proxy/gnostr-proxy || true
- run: make
- run: make install
- run: ./gnostr-proxy > relays & cat relays
- run: wait 10000 && pkill -P $(cat PROCESS) || true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# git update-index --assume-unchanged node_modules/.pnpm/node_modules/p-map && \
# git update-index --assume-unchanged node_modules/.pnpm/node_modules/sprintf-js

.gnostr/gnostr.relays
relays

PROCESS
APP_KEY
!*akefile
**.DS_Store
Expand Down
41 changes: 40 additions & 1 deletion gnostr-proxy
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env bash

PROCESS=$$
echo $$ > PROCESS

TERM=xterm

ARG=${1:-}

help(){
Expand Down Expand Up @@ -32,9 +37,43 @@ then
printf "v0.0.0"; exit
fi

## var=$CI
## if [[ -z "$var" ]]; then
## echo "var=$var; CI=$CI"
## fi
## [[ -z "$var" ]]; echo "var=$var;"
## ## [[ -z "$CI" ]]; echo "CI=$CI"

gnostr-set-relays 2>/tmp/gnostr-proxy.log || echo
(echo `pwd`) & clear && \

## CI=test
## echo 48:CI=test

## if [[ -z $CI ]];
## then
## echo "-z CI=$CI"
## fi
## if [[ ! -z $CI ]];
## then
## echo "! -z CI=$CI"
## fi

##CI=""
## echo 54:CI=\"\"

## if [[ -z "$CI" ]];
## then
## echo "-z CI=$CI"
## fi
## if [[ ! -z "$CI" ]];
## then
## echo "! -z CI=$CI"
## fi

if [[ -z "$CI" ]];
then
(echo `pwd`) & clear
fi
# gnostr-proxy sub-shell process
#
#
Expand Down

0 comments on commit 4a4762e

Please sign in to comment.