fix: Distinguish between tracks with the same title but different #208
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 workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| # GitHub recommends pinning actions to a commit SHA. | |
| # To get a newer version, you will need to update the SHA. | |
| # You can also reference a tag or branch, but the action may change without warning. | |
| name: Publish Docker image | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "docs/**" | |
| - "README.md" | |
| - ".env.example" | |
| pull_request: | |
| branches: | |
| - "main" | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Go Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install libvips | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libvips-dev | |
| - name: Verify libvips install | |
| run: vips --version | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| uses: robherley/go-test-action@v0 | |
| push_to_registry: | |
| name: Push Docker image to Docker Hub (release) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: gabehf/koito | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| flavor: | | |
| prefix=v | |
| - name: Build and push release image | |
| id: push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| KOITO_VERSION=${{ steps.meta.outputs.version }} | |
| platforms: linux/amd64,linux/arm64 | |
| push_dev: | |
| name: Push Docker image (dev branch) | |
| if: github.ref == 'refs/heads/main' | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push dev image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| tags: | | |
| gabehf/koito:dev | |
| gabehf/koito:dev-${{ github.sha }} | |
| build-args: | | |
| KOITO_VERSION=dev | |
| platforms: linux/amd64,linux/arm64 |