Skip to content

refine about-new-src docs #99

refine about-new-src docs

refine about-new-src docs #99

name: Github Release CI
on:
push:
branches:
- main
tags:
workflow_dispatch:
inputs:
tag:
description: Tag
default: 'latest'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.ref_name == 'main' }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Prepare Version Values
uses: cardinalby/export-env-action@v2
id: versions
with:
envFile: '.env.versions'
export: 'false'
-
name: Create template directories
id: prepare
run: |
mkdir mdcx-docker && cd mdcx-docker && cp -a ../gui-base/. .
cp .env.sample .env
cp mdcx-src.sample.yml docker-compose.yml
rm Dockerfile*
rm -rf rootfs*
cd ..
zip -q -r template-mdcx-src-gui-base.zip mdcx-docker
cd mdcx-docker
cp -f mdcx-builtin.sample.yml docker-compose.yml
cd ..
zip -q -r template-mdcx-builtin-gui-base.zip mdcx-docker
rm -rf mdcx-docker
mkdir mdcx-docker && cd mdcx-docker && cp -a ../webtop-base/. .
cp .env.sample .env
cp mdcx-src.sample.yml docker-compose.yml
rm Dockerfile*
rm -rf rootfs*
cd ..
zip -q -r template-mdcx-src-webtop-base.zip mdcx-docker
cd mdcx-docker
cp -f mdcx-builtin.sample.yml docker-compose.yml
cd ..
zip -q -r template-mdcx-builtin-webtop-base.zip mdcx-docker
rm -rf mdcx-docker
TAG=
if [[ "${{ github.event_name }}" == "tag" ]]; then
TAG=${{ github.ref_name }}
fi
FALLBACK_TAG=${{ github.event.inputs.tag }}
TAG=${TAG-${FALLBACK_TAG}}
echo "TAG=$TAG" >> $GITHUB_OUTPUT
-
name: Create latest release
uses: ncipollo/release-action@v1
with:
name: "latest"
tag: "latest"
allowUpdates: true
removeArtifacts: true
replacesArtifacts: true
artifacts: "template-*.zip"