56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
name: Render and Deploy OpenCloud
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
repository_dispatch:
|
|
|
|
jobs:
|
|
render:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Delete and Make Work Directory
|
|
run: |
|
|
rm -rf work
|
|
mkdir -p work
|
|
|
|
- name: Checkout opencloud-compose Repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
repository: lyra_phasma/opencloud-compose
|
|
path: work/opencloud-compose
|
|
ref: main
|
|
|
|
- name: List files
|
|
run: |
|
|
apt-get update
|
|
apt-get install tree
|
|
tree .
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Install Python
|
|
run: |
|
|
pip install ruamel.yaml
|
|
|
|
- name: Install Docker Compose Plugin
|
|
run: |
|
|
docker version
|
|
docker compose version || true
|
|
|
|
- name: Modify Files
|
|
run: |
|
|
bash scripts/render-compose.sh
|
|
|
|
- name: Push Back to Repository
|
|
run: |
|
|
git config user.name "gitea-actions[bot]"
|
|
git config user.email "gitea-actions[bot]@localhost"
|
|
git add .
|
|
git commit -m "Modify Files" || echo "No changes to commit"
|
|
git push origin main |