CI: add deploy step to GitHub Actions

This commit is contained in:
liushuyu 2021-08-26 21:24:52 -06:00
parent ecebeab57c
commit 87f5788567
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437

View File

@ -13,7 +13,7 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [13.x] node-version: [14.x]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -23,3 +23,21 @@ jobs:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- run: yarn - run: yarn
- run: yarn build - run: yarn build
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
name: Setup Docker BuildX system
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v2
name: Deploy the image
with:
push: true
tags: citraemu/discord-bot:latest