Updated build task
This commit is contained in:
parent
38d0539a5f
commit
993a94ddb1
34
.drone.yml
34
.drone.yml
@ -1,24 +1,22 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build-app
|
||||
name: publish-bot
|
||||
|
||||
steps:
|
||||
- name: build-dotnet
|
||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||
commands:
|
||||
- dotnet build
|
||||
|
||||
steps:
|
||||
- name: build-docker
|
||||
image: docker:dind
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
- name: build-image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.kizaing.ca
|
||||
username:
|
||||
from_secret: DOCKER_USER
|
||||
password:
|
||||
from_secret: DOCKER_PASS
|
||||
repo: git.kizaing.ca/kizaing/TeleTok
|
||||
tags: latest
|
||||
|
||||
# Commented out until stuff actually works
|
||||
#trigger:
|
||||
# branch:
|
||||
# - main
|
||||
# event:
|
||||
# - push
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
13
Dockerfile
13
Dockerfile
@ -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
|
||||
|
||||
WORKDIR /app/teletok
|
||||
|
||||
RUN apk update && apk add --update nodejs nodejs-npm
|
||||
|
||||
RUN npm i -g tiktok-scraper
|
||||
|
||||
COPY bin/Debug/net6.0/* /app/teletok/
|
||||
COPY --from=build-task /build/bin/Debug/net6.0/publish/* /app/teletok/
|
||||
|
||||
CMD [ "TeleTok" ]
|
Loading…
Reference in New Issue
Block a user