chore(release): rilascia versione 1.1.0 #2
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: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Trigger on version tags (v1.0.0, v1.2.3, etc.) | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # For creating releases | |
| packages: write # For pushing to GHCR | |
| strategy: | |
| matrix: | |
| include: | |
| - dockerfile: Dockerfile | |
| suffix: "" | |
| - dockerfile: Dockerfile.tika | |
| suffix: "-tika" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Building version: $VERSION" | |
| - name: Extract metadata for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=semver,pattern={{version}},suffix=${{ matrix.suffix }} | |
| type=semver,pattern={{major}}.{{minor}},suffix=${{ matrix.suffix }} | |
| type=raw,value=latest,suffix=${{ matrix.suffix }},enable=${{ matrix.suffix == '' }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ${{ matrix.dockerfile }} | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| create-release: | |
| needs: build-and-push | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: Ragify v${{ steps.version.outputs.version }} | |
| generate_release_notes: true | |
| body: | | |
| ## Docker Images | |
| Pull the image from GitHub Container Registry: | |
| ```bash | |
| # Standard image | |
| docker pull ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }} | |
| # With Apache Tika (PDF/Office support) | |
| docker pull ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}-tika | |
| ``` | |
| ## Quick Start | |
| ```bash | |
| # Run without authentication | |
| docker run -d -p 8080:8080 ghcr.io/${{ github.repository }}:latest | |
| # Run with GitHub OAuth | |
| docker run -d -p 8080:8080 \ | |
| -v ragify_data:/data \ | |
| -v ./users.yaml:/config/users.yaml:ro \ | |
| -e AUTH_CONFIG=/config/users.yaml \ | |
| -e GITHUB_CLIENT_ID=your_client_id \ | |
| -e GITHUB_CLIENT_SECRET=your_client_secret \ | |
| ghcr.io/${{ github.repository }}:latest | |
| ``` | |
| See [README](https://github.com/${{ github.repository }}#readme) for full documentation. | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |