This commit is contained in:
@ -1,9 +1,9 @@
|
|||||||
name: Gitea Actions Demo
|
name: ocean
|
||||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Explore-Gitea-Actions:
|
Build-and-Deploy-Modules:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
- 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: git clone ${{ gitea.server_url }}/${{ gitea.repository }} .
|
||||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
- 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."
|
- 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: |
|
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 build -t file -f docker/docker-file/Dockerfile .
|
||||||
docker compose -f docker/docker-file/docker-compose-prod.yaml up -d
|
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 }}."
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||||
@ -36,4 +36,5 @@ func main() {
|
|||||||
|
|
||||||
fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
|
fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
|
||||||
s.Start()
|
s.Start()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user