All checks were successful
ocean / Build-and-Deploy-Modules (push) Successful in 1m13s
37 lines
1.6 KiB
YAML
37 lines
1.6 KiB
YAML
name: ocean
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
on: [push]
|
|
|
|
jobs:
|
|
Build-and-Deploy-Modules:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
|
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
- name: Check out repository code
|
|
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: 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 }}." |