Updated build task
This commit is contained in:
parent
38d0539a5f
commit
993a94ddb1
34
.drone.yml
34
.drone.yml
@ -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
|
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
|
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" ]
|
Loading…
Reference in New Issue
Block a user