Route channel logos through /api/image-proxy to fix mixed content over HTTPS #1200
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
| # This GitHub Actions workflow automates building and pushing your Docker image. | |
| # | |
| # It pushes to two different container registries: | |
| # 1. GitHub Container Registry (ghcr.io) | |
| # 2. Docker Hub (docker.io) | |
| # | |
| # TRIGGERS: | |
| # 1. On a push to the 'main' branch (automatic). | |
| # 2. When a new version tag 'v*.*.*' is pushed (automatic). | |
| # 3. On a pull request to 'main' (automatic, build-only validation). | |
| # 4. Manually for any branch, using the 'Run workflow' button (manual). | |
| # | |
| name: Docker Image CI/CD | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| tags: | |
| - 'v*.*.*' # Trigger on version tags like v1.0, v1.2.3 | |
| paths-ignore: | |
| - 'README.md' # This will prevent the workflow from running on changes to README.md | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: # Allows you to manually run this workflow | |
| jobs: | |
| build_and_push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Log in to Docker Hub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract metadata (tags and labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ghcr.io/${{ github.repository }} | |
| ${{ secrets.DOCKERHUB_USERNAME }}/viniplay | |
| tags: | | |
| # Tag with branch name on push or manual run. | |
| # e.g., a manual run on 'dev' branch will create a 'dev' tag. | |
| type=ref,event=branch | |
| # Creates the 'latest' tag when a push is made to the default branch (main). | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| # Creates version tags when a git tag is pushed (e.g., v1.2.3 -> 1.2.3 and 1.2). | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: ${{ github.event_name != 'pull_request' }} # Don't push on pull requests | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: linux/amd64,linux/arm64 |