Skip to content

my-awesome/actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

actions

gh-update

How to test it locally

docker build -t my-awesome/gh-update-action ./gh-update-action
docker run --rm my-awesome/gh-update-action "my-email" "my-name"

telegram

# an update is considered confirmed as soon as getUpdates
# is called with an offset higher than the latest update_id
http https://api.telegram.org/bot${TELEGRAM_API_TOKEN}/getUpdates?offset=${TELEGRAM_OFFSET}

How to test it locally

# test
docker run --rm --name ubuntu -it ubuntu:22.04

# build
docker build -t my-awesome/telegram-action ./telegram-action

# run
docker run --rm \
  --env TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
  --env-file ./telegram-action/telegram.secrets \
  --volume ${PWD}/telegram-action/telegram.json:/telegram.json \
  --volume ${PWD}/telegram-action/content:/content \
  my-awesome/telegram-action "/telegram.json"

# requires
cat ./telegram-action/telegram.secrets
#TELEGRAM_API_TOKEN=
#TELEGRAM_FROM_ID=