Skip to content

Commit dfebe15

Browse files
add github actions
1 parent ac50017 commit dfebe15

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/docker.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Docker Image
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
paths:
7+
- "service/**"
8+
- "docker-compose.yml"
9+
- ".github/workflows/docker.yml"
10+
pull_request:
11+
workflow_dispatch:
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "build"
16+
build:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
20+
# Steps represent a sequence of tasks that will be executed as part of the job
21+
steps:
22+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23+
- uses: actions/checkout@v2
24+
25+
# Runs a single command using the runners shell
26+
- name: compose-run
27+
shell: bash
28+
env:
29+
HOST_UID: "1000"
30+
HOST_GID: "1000"
31+
HOST_USERNAME: ${{ secrets.HOST_USERNAME }}
32+
HOST_GROUPNAME: ${{ secrets.HOST_GROUPNAME }}
33+
run: |
34+
docker compose --env-file ./service/.env up -d
35+
docker compose --env-file ./service/.env exec service bash python3 main.py

0 commit comments

Comments
 (0)