test
All checks were successful
ocean / Build-and-Deploy-Modules (push) Successful in 1m13s

This commit is contained in:
2025-06-26 21:01:18 +08:00
parent 9fa26bc026
commit ec380030ca
2 changed files with 21 additions and 3 deletions

View File

@ -1,9 +1,9 @@
name: Gitea Actions Demo
name: ocean
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
Build-and-Deploy-Modules:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
@ -13,8 +13,25 @@ jobs:
run: git clone ${{ gitea.server_url }}/${{ gitea.repository }} .
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
- name: Get changed files
id: changes
run: |
echo "CHANGED=$(git diff --name-only ${{ gitea.before }} ${{ gitea.after }})" >> $GITHUB_ENV
echo "CHANGED=${{ env.CHANGED }}"
- name: Build file service if changed
if: contains(env.CHANGED, 'file/')
run: |
echo "File module changed, building..."
docker build -t file -f docker/docker-file/Dockerfile .
docker compose -f docker/docker-file/docker-compose-prod.yaml up -d
- name: Build user service if changed
if: contains(env.CHANGED, 'user/')
run: |
echo "File module changed, building..."
docker build -t file -f docker/docker-user/Dockerfile .
docker compose -f docker/docker-user/docker-compose-prod.yaml up -d
- run: echo "🍏 This job's status is ${{ job.status }}."