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

45 lines
1017 B
YAML
Raw Normal View History

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