a docker container which checks if a given domain is still available and sends a message through gotify using gotify-cli
fetch your gotify token from the config file created by gotify initialization which you could perform on your local machine or from within a docker container.
cat cli.json
{
"token": "BAR",
"url": "FOO",
"defaultPriority": 0
}
$ docker run --rm -e GOTIFY_URL=FOO -e GOTIFY_TOKEN=BAR visibilityspots/domain-watcher:latest visibilityspots.org
$ docker build -t visibilityspots/domain-watcher:dev .
I wrote some tests in a goss.yaml file which can be executed by dgoss
$ dgoss run -e GOTIFY_URL=FOO -e GOTIFY_TOKEN=BAR visibilityspots/domain-watcher:dev visibilityspots.org
INFO: Starting docker container
INFO: Container ID: 61bd26b7
INFO: Sleeping for 0.2
INFO: Container health
INFO: Running Tests
Command: domain-watcher: exit-status: matches expectation: [0]
Command: whois visibilityspots.org: exit-status: matches expectation: [0]
Total Duration: 1.020s
Count: 2, Failed: 0, Skipped: 0
INFO: Deleting container
using act for local testing of the written github actions makes my life and commit history a lot easier;
$ act -l
Stage Job ID Job name Workflow name Workflow file Events
0 update update docker-hub-description docker-hub-description.yml push
0 test test CI main.yaml push
0 scan scan trivy trivy.yml push,pull_request,schedule
1 deploy deploy CI main.yaml push
$ act -j test
[CI/test] π Start image=catthehacker/ubuntu:act-latest
.
.
.
[CI/test] β
Success - Main Execute Goss tests
[CI/test] π Job succeeded
Distributed under the MIT license