diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..c1b6c48 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build -t awscibo . --file Dockerfile --tag awscibo:$(date +%s) diff --git a/Dockerfile b/Dockerfile index a0ea9b6..b3d985e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ FROM node:latest RUN npm i -g awscibo -CMD ["awscibo", "yourbottokenhere"] +CMD awscibo $BOT_TOKEN diff --git a/README.md b/README.md index 44a0b1f..25dad8f 100644 --- a/README.md +++ b/README.md @@ -54,15 +54,11 @@ node awesomescibo.mjs ``` git clone https://github.com/ADawesomeguy/AwesomeSciBo.git ``` -2) Enter repo and edit bot token in Dockerfile -``` -cd AwesomeSciBo. -vim Dockerfile -``` -3) Build and run Docker image +2) Enter repo, build, and run Docker image ``` +cd AwesomeSciBo docker build -t awscibo . -docker run --name awscibo -d awscibo +docker run -e BOT_TOKEN=[your bot token here] --name awscibo -d awscibo ``` ## Usage To get started, run the command `do be helping` to get a list of commands. The more helpful commands will be the ones that generate packets, which are `do be roundgen pdf/html` and `do be roundgen pdf/html dm`.