This commit is contained in:
qiaofeng1227 2023-07-06 09:36:01 +08:00
parent c4781f15e9
commit 4d81ac75e7
3 changed files with 53 additions and 4 deletions

View file

@ -35,8 +35,8 @@ jobs:
touch myread.md
echo "This repository is the easiest appmanage deployment on GitHub and DockerHub "'
```
git clone https://github.com/Websoft9/Stackhub.git
sudo docker network create websoft9 && cd Stackhub/appmanage && sudo docker compose up -d
git clone https://github.com/Websoft9/websoft9.git
sudo docker network create websoft9 && cd websoft9/appmanage && sudo docker compose up -d
```' > myread.md
- name: Docker Hub Description

View file

@ -6,7 +6,56 @@ on:
- main
jobs:
build:
build-image:
name: Build Docker image
runs-on: ubuntu-latest
env:
TAGS: latest
steps:
- uses: actions/checkout@v2
name: Check out code
- name: Check for appmanage changes
id: appmanage
run: |
changed_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }})
appmanage_changed=$(echo $changed_files | grep -c "appmanage")
echo ::set-output name=changed::${appmanage_changed}
- uses: mr-smithers-excellent/docker-build-push@v5
name: Build & push Docker image
if: steps.appmanage.outputs.changed > 0
with:
image: websoft9dev/appmanage
tags: 0.7.2
registry: docker.io
dockerfile: appmanage/Dockerfile
directory: appmanage
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: add readme file
if: steps.appmanage.outputs.changed > 0
run: |
cd appmanage
touch myread.md
echo "This repository is the easiest appmanage deployment on GitHub and DockerHub "'
```
git clone https://github.com/Websoft9/websoft9.git
sudo docker network create websoft9 && cd websoft9/appmanage && sudo docker compose up -d
```' > myread.md
- name: Docker Hub Description
if: steps.appmanage.outputs.changed > 0
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: websoft9dev/appmanage
readme-filepath: appmanage/myread.md
ci-test:
needs: build
runs-on: ubuntu-latest
steps:

View file

@ -10,7 +10,7 @@ COPY static ./static
COPY requirements.txt main.py database.sqlite ./
RUN apt update
# Install supervisords
# Install supervisord
RUN apt install -y supervisor
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY config/cmd.sh /cmd.sh