Fix: Add missing CSS for file/folder context menu (three dots) #133
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI, Release & Docker Publish | |
| on: | |
| push: | |
| branches: [ main, master, develop ] | |
| tags: | |
| - 'v*' # Also run CI on version tags | |
| pull_request: | |
| branches: [ main, master, develop ] | |
| env: | |
| REGISTRY: docker.io | |
| # IMAGE_NAME will be set dynamically using DOCKER_USERNAME secret | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r cms/requirements.txt | |
| pip install pytest pytest-cov | |
| - name: Test with pytest (if tests exist) | |
| run: | | |
| if [ -d "tests" ] && [ "$(ls -A tests)" ]; then | |
| pytest tests/ -v | |
| else | |
| echo "No tests found, skipping test step" | |
| fi | |
| continue-on-error: true | |
| - name: Test Flask app startup | |
| run: | | |
| cd cms | |
| # Set environment variables for testing | |
| export CMS_BASE_DIR=$(mktemp -d) | |
| export SECRET_KEY=test-key | |
| python -c "from app import app; print('Flask app loads successfully')" | |
| release: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for tags | |
| - name: Extract version from tag | |
| id: tag_version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Version: $VERSION" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: Release ${{ steps.tag_version.outputs.version }} | |
| body: | | |
| ## Way-CMS ${{ steps.tag_version.outputs.version }} | |
| ### Installation | |
| Using Docker: | |
| ```bash | |
| docker pull docker.io/drumsergio/way-cms:${{ steps.tag_version.outputs.version }} | |
| ``` | |
| Or clone and run: | |
| ```bash | |
| git clone https://github.com/${{ github.repository }}.git | |
| cd Way-CMS | |
| docker-compose up -d | |
| ``` | |
| ### Changes | |
| See [CHANGELOG](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details. | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| docker-publish: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v') && needs.release.result == 'success' | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: docker.io/${{ secrets.DOCKER_USERNAME }}/way-cms | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./cms | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |