Updated build task

This commit is contained in:
Chris Plaatjes 2023-02-14 15:06:39 -05:00
parent 38d0539a5f
commit 993a94ddb1
2 changed files with 24 additions and 23 deletions

View File

@ -1,24 +1,22 @@
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: build-app name: publish-bot
steps: - name: build-image
- name: build-dotnet image: plugins/docker
image: mcr.microsoft.com/dotnet/sdk:6.0 settings:
commands: registry: git.kizaing.ca
- dotnet build username:
from_secret: DOCKER_USER
steps: password:
- name: build-docker from_secret: DOCKER_PASS
image: docker:dind repo: git.kizaing.ca/kizaing/TeleTok
volumes: tags: latest
- name: dockersock
path: /var/run/docker.sock
# Commented out until stuff actually works # Commented out until stuff actually works
#trigger: trigger:
# branch: branch:
# - main - main
# event: event:
# - push - push

View File

@ -1,11 +1,14 @@
#Builds the bot from source
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-task
COPY . /build
RUN cd /build && dotnet publish
# Actually runs the bot
FROM mcr.microsoft.com/dotnet/runtime:6.0-alpine3 FROM mcr.microsoft.com/dotnet/runtime:6.0-alpine3
WORKDIR /app/teletok WORKDIR /app/teletok
RUN apk update && apk add --update nodejs nodejs-npm COPY --from=build-task /build/bin/Debug/net6.0/publish/* /app/teletok/
RUN npm i -g tiktok-scraper
COPY bin/Debug/net6.0/* /app/teletok/
CMD [ "TeleTok" ] CMD [ "TeleTok" ]