Auto-indexing service and GraphQL API for AT Protocol Records
quickslice.slices.network/
atproto
gleam
graphql
1name: Build and Publish Docker Image
2
3on:
4 push:
5 tags:
6 - 'v*'
7
8env:
9 GHCR_IMAGE: ghcr.io/${{ github.repository }}
10 ATCR_IMAGE: atcr.io/slices.network/quickslice
11
12jobs:
13 build-and-push:
14 runs-on: ubuntu-latest
15 permissions:
16 contents: read
17 packages: write
18 id-token: write
19
20 steps:
21 - name: Checkout repository
22 uses: actions/checkout@v4
23
24 - name: Set up Docker Buildx
25 uses: docker/setup-buildx-action@v3
26
27 - name: Log in to GitHub Container Registry
28 if: github.event_name != 'pull_request'
29 uses: docker/login-action@v3
30 with:
31 registry: ghcr.io
32 username: ${{ github.actor }}
33 password: ${{ secrets.GITHUB_TOKEN }}
34
35 - name: Log in to ATCR
36 if: github.event_name != 'pull_request'
37 uses: docker/login-action@v3
38 with:
39 registry: atcr.io
40 username: ${{ secrets.ATCR_USERNAME }}
41 password: ${{ secrets.ATCR_PASSWORD }}
42
43 - name: Extract metadata (tags, labels)
44 id: meta
45 uses: docker/metadata-action@v5
46 with:
47 images: |
48 ${{ env.GHCR_IMAGE }}
49 ${{ env.ATCR_IMAGE }}
50 tags: |
51 type=ref,event=branch
52 type=ref,event=pr
53 type=semver,pattern={{version}}
54 type=semver,pattern={{major}}.{{minor}}
55 type=semver,pattern={{major}}
56 type=sha
57 type=raw,value=latest,enable={{is_default_branch}}
58
59 - name: Build and push Docker image
60 uses: docker/build-push-action@v5
61 with:
62 context: .
63 push: ${{ github.event_name != 'pull_request' }}
64 tags: ${{ steps.meta.outputs.tags }}
65 labels: ${{ steps.meta.outputs.labels }}
66 cache-from: type=gha
67 cache-to: type=gha,mode=max
68 platforms: linux/amd64,linux/arm64