30 lines
845 B
YAML
30 lines
845 B
YAML
name: Silvanus Production Dockerization
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
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 v0idf1sh/silvanus
|
|
run: docker build . --file Dockerfile --tag v0idf1sh/silvanus
|
|
- name: Log into Docker Hub
|
|
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
|
|
- name: Push image to Docker Hub v0idf1sh/silvanus
|
|
run: docker push v0idf1sh/silvanus
|
|
- name: Set up a skeleton .env file
|
|
run: echo "TOKEN=${{secrets.PRODTOKEN}}" > .env && echo "clientId=${{ secrets.PRODCLIENTID }}" >> .env
|
|
- name: Install modules
|
|
run: npm i
|
|
- name: Refresh commands with Discord
|
|
run: node modules/_deploy-global.js |