Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
ci
  • Loading branch information
punkrelique authored Oct 29, 2023
2 parents 3bf1a2a + 9f05a08 commit 7bedc70
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Docker image
run: docker build --tag punkrelique/botinok:latest src/ -f src/Botinok/Dockerfile

- name: Push Docker image
run: docker push punkrelique/botinok:latest

32 changes: 32 additions & 0 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Dotnet build app

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
main:
strategy:
fail-fast: false
runs-on: ubuntu-latest

env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

- name: Restore dependencies
working-directory: src/Botinok/
run: dotnet restore

- name: Build
working-directory: src/Botinok/
run: dotnet build
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.8'
services:
botinok:
build:
context: ./src/Botinok/
dockerfile: ./Dockerfile
image: punkrelique/botinok
restart: always
environment:
- Botinok__Token=""
ports:
- "3000:3000"

0 comments on commit 7bedc70

Please sign in to comment.