2023-02-11 01:19:30 +00:00
|
|
|
name: Bot Dockerization
|
2023-01-21 04:35:03 +00:00
|
|
|
|
|
|
|
on:
|
2023-02-11 01:19:30 +00:00
|
|
|
#pull_request:
|
|
|
|
# branches: [ "main" ]
|
2023-01-21 04:35:03 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
|
|
|
DHUB_PWORD: ${{ secrets.DHUB_PWORD }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Build the Docker image
|
2023-02-11 01:19:30 +00:00
|
|
|
run: docker build . --file Dockerfile --tag v0idf1sh/tag
|
2023-01-21 04:35:03 +00:00
|
|
|
- name: Log into Docker Hub
|
|
|
|
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
|
|
|
|
- name: Push image to Docker Hub
|
2023-02-11 01:19:30 +00:00
|
|
|
run: docker push v0idf1sh/tag
|
|
|
|
- name: Set up a skeleton .env file
|
|
|
|
run: echo "TOKEN=${{secrets.TOKEN}}" > .env && echo "BOTID=${{ secrets.BOTID }}" >> .env
|
|
|
|
- name: Install modules
|
|
|
|
run: npm i
|
|
|
|
- name: Refresh commands with Discord
|
|
|
|
run: node modules/_deploy-global.js
|