|
| 1 | +name: Publish Docker Images |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - "v*.*.*" |
| 7 | + |
| 8 | +permissions: |
| 9 | + packages: write |
| 10 | + contents: read |
| 11 | + |
| 12 | +jobs: |
| 13 | + docker-publish-mcp: |
| 14 | + name: docker-publish-mcp |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - name: Checkout |
| 18 | + uses: actions/checkout@v5 |
| 19 | + with: |
| 20 | + submodules: recursive |
| 21 | + - name: Docker meta |
| 22 | + id: meta |
| 23 | + uses: docker/metadata-action@v5 |
| 24 | + with: |
| 25 | + images: | |
| 26 | + docker.io/timescale/tiger-memory-mcp |
| 27 | + ghcr.io/timescale/tiger-memory-mcp |
| 28 | + tags: | |
| 29 | + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} |
| 30 | + type=semver,pattern={{version}} |
| 31 | + type=semver,pattern={{major}}.{{minor}} |
| 32 | + type=semver,pattern={{major}} |
| 33 | + - name: Set up QEMU |
| 34 | + uses: docker/setup-qemu-action@v3 |
| 35 | + - name: Set up Docker Buildx |
| 36 | + uses: docker/setup-buildx-action@v3 |
| 37 | + - name: Login to Docker Hub |
| 38 | + uses: docker/login-action@v3 |
| 39 | + with: |
| 40 | + username: ${{ secrets.ORG_DOCKER_HUB_USERNAME }} |
| 41 | + password: ${{ secrets.ORG_DOCKER_HUB_ACCESS_TOKEN }} |
| 42 | + - name: Login to GitHub Container Registry |
| 43 | + uses: docker/login-action@v3 |
| 44 | + with: |
| 45 | + registry: ghcr.io |
| 46 | + username: ${{ github.repository_owner }} |
| 47 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 48 | + - name: Build and push |
| 49 | + uses: docker/build-push-action@v6 |
| 50 | + with: |
| 51 | + context: . |
| 52 | + platforms: linux/amd64,linux/arm64 |
| 53 | + push: true |
| 54 | + tags: ${{ steps.meta.outputs.tags }} |
| 55 | + labels: ${{ steps.meta.outputs.labels }} |
0 commit comments