mirror of
https://github.com/mivodev/mivo.git
synced 2026-01-26 13:31:56 +07:00
feat: Implement a core plugin system, integrate flag icon assets, and establish a GitHub release workflow.
This commit is contained in:
23
.github/workflows/docker-publish.yml
vendored
23
.github/workflows/docker-publish.yml
vendored
@@ -10,9 +10,9 @@ on:
|
||||
|
||||
env:
|
||||
# Use docker.io for Docker Hub if empty
|
||||
REGISTRY: docker.io
|
||||
REGISTRY: ghcr.io
|
||||
# github.repository as <account>/<repo>
|
||||
IMAGE_NAME: dyzulk/mivo
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -30,13 +30,21 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# Login against a Docker registry except on PR
|
||||
# https://github.com/docker/login-action
|
||||
# Login against GHCR
|
||||
- name: Log into registry ${{ env.REGISTRY }}
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Login against Docker Hub (Optional fallback if secrets exist)
|
||||
- name: Log into Docker Hub
|
||||
if: github.event_name != 'pull_request' && secrets.DOCKER_USERNAME != ''
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: docker.io
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
@@ -46,13 +54,12 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
images: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
docker.io/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
# Branch main -> dyzulk/mivo:edge
|
||||
type=raw,value=edge,enable={{is_default_branch}}
|
||||
# Tag v1.0.0 -> dyzulk/mivo:1.0.0
|
||||
type=ref,event=tag
|
||||
# Tag v1.0.0 -> dyzulk/mivo:latest
|
||||
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
|
||||
# Build and push Docker image with Buildx (don't push on PR)
|
||||
|
||||
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
@@ -32,11 +32,25 @@ jobs:
|
||||
# Export source using git archive (respects .gitattributes)
|
||||
git archive --format=tar HEAD | tar -x -C release_temp
|
||||
|
||||
- name: Install Development Dependencies (for Build)
|
||||
run: npm install
|
||||
|
||||
- name: Build Localized Assets & Editor Bundle
|
||||
run: |
|
||||
npm run sync:assets
|
||||
npm run build:editor
|
||||
|
||||
- name: Install Production Dependencies
|
||||
run: |
|
||||
cd release_temp
|
||||
composer install --no-dev --optimize-autoloader --no-interaction --ignore-platform-reqs
|
||||
|
||||
- name: Copy Build Artifacts to Release
|
||||
run: |
|
||||
cp -r public/assets/vendor/ release_temp/public/assets/
|
||||
mkdir -p release_temp/public/assets/js/vendor/
|
||||
cp public/assets/js/vendor/editor.bundle.js release_temp/public/assets/js/vendor/
|
||||
|
||||
- name: Build Zip Artifact
|
||||
run: |
|
||||
cd release_temp
|
||||
|
||||
Reference in New Issue
Block a user