Command-fix/.github/workflows/nodejs.yml

45 lines
1017 B
YAML
Raw Normal View History

2020-05-02 01:57:50 -04:00
name: Node.js CI
on:
push:
2022-09-14 05:08:26 -04:00
branches: [ '*' ]
2020-05-02 01:57:50 -04:00
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
2020-05-02 01:57:50 -04:00
steps:
2022-11-18 23:04:35 -05:00
- uses: actions/checkout@v3
2020-05-02 01:57:50 -04:00
- name: Use Node.js ${{ matrix.node-version }}
2022-11-18 23:04:35 -05:00
uses: actions/setup-node@v3
2020-05-02 01:57:50 -04:00
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn build
2021-08-26 23:24:52 -04:00
deploy:
needs: build
runs-on: ubuntu-latest
if: (github.ref == 'refs/heads/master') && (github.repository == 'citra-emu/discord-bot')
2021-08-26 23:24:52 -04:00
steps:
2022-11-18 23:04:35 -05:00
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
2021-08-26 23:24:52 -04:00
name: Setup Docker BuildX system
- name: Login to DockerHub
2022-11-18 23:04:35 -05:00
uses: docker/login-action@v2
2021-08-26 23:24:52 -04:00
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2022-11-18 23:04:35 -05:00
- uses: docker/build-push-action@v3
2021-08-26 23:24:52 -04:00
name: Deploy the image
with:
push: true
tags: citraemu/discord-bot:latest