diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae98a59..9d066a4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,12 @@ name: ci on: push: branches: - - main + - 'main' + tags: + - 'v*' + pull_request: + branches: + - 'main' env: REGISTRY: ghcr.io @@ -34,6 +39,11 @@ jobs: uses: docker/metadata-action@v2 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} - name: Build and push Docker image uses: docker/build-push-action@v4 diff --git a/README.md b/README.md index d786084..34389c9 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ version: '3.3' services: categorizer: - image: bahuma20/firefly-iii-ai-categorize:latest + image: ghcr.io/bahuma20/firefly-iii-ai-categorize:latest restart: always ports: - "3000:3000" @@ -80,7 +80,7 @@ docker run -d \ -e FIREFLY_URL=https://firefly.example.com \ -e FIREFLY_PERSONAL_TOKEN=eyabc123... \ -e OPENAI_API_KEY=sk-abc123... \ -bahuma20/firefly-iii-ai-categorize:latest +ghcr.io/bahuma20/firefly-iii-ai-categorize:latest ``` ### 4. Set up the webhook