From 2dcbced91e06a02e3175b74285ebad38a2bfb086 Mon Sep 17 00:00:00 2001 From: Xeovalyte Date: Fri, 11 Aug 2023 11:43:14 +0200 Subject: [PATCH] added ci --- .gitea/workflows/release.yaml | 28 ++++++++++++++++++++++++++++ discordbot/Dockerfile | 7 +++++++ 2 files changed, 35 insertions(+) create mode 100644 .gitea/workflows/release.yaml create mode 100644 discordbot/Dockerfile diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..4f8a0d8 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,28 @@ +name: Build and Publish +on: [push] + +jobs: + Build and Publish Discord Bot: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 18 + + - run: npm install + working-directory: ./discordbot + + - uses: docker/login-action@v2 + with: + registry: gitea.xeovalyte.dev + username: ${{ gitea.actor }} + password: ${{ secrets.GITEA_TOKEN }} + + - uses: docker/build-push-action@master + with: + context: ./discordbot + push: true + tags: latest + diff --git a/discordbot/Dockerfile b/discordbot/Dockerfile new file mode 100644 index 0000000..74152b8 --- /dev/null +++ b/discordbot/Dockerfile @@ -0,0 +1,7 @@ +FROM node:18-alpine + +WORKDIR /usr/src/app + +COPY . . + +CMD ["node", "index.js"]