Your music, beautifully tracked. All yours. (coming soon) teal.fm
teal-fm atproto
at main 70 lines 1.8 kB view raw
1# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json 2 3name: Build and Push Aqua 4 5on: 6 push: 7 branches: 8 - main 9 paths: 10 - "apps/aqua/**" 11 - "Cargo.toml" 12 - "Cargo.lock" 13 - ".github/workflows/aqua.yml" 14 pull_request: 15 branches: 16 - main 17 paths: 18 - "apps/aqua/**" 19 - "Cargo.toml" 20 - "Cargo.lock" 21 - ".github/workflows/aqua.yml" 22 23env: 24 REGISTRY: ghcr.io 25 IMAGE_NAME: ${{ github.repository }}/aqua 26 27jobs: 28 build-and-push: 29 runs-on: ubuntu-latest 30 permissions: 31 contents: read 32 packages: write 33 34 steps: 35 - name: Checkout repository 36 uses: actions/checkout@v4 37 38 - name: Log in to Container Registry 39 if: github.event_name != 'pull_request' 40 uses: docker/login-action@v3 41 with: 42 registry: ${{ env.REGISTRY }} 43 username: ${{ github.actor }} 44 password: ${{ secrets.GITHUB_TOKEN }} 45 46 - name: Extract metadata 47 id: meta 48 uses: docker/metadata-action@v5 49 with: 50 images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 51 tags: | 52 type=ref,event=branch 53 type=ref,event=pr 54 type=sha,prefix=sha- 55 type=raw,value=latest,enable={{is_default_branch}} 56 57 - name: Set up Docker Buildx 58 uses: docker/setup-buildx-action@v3 59 60 - name: Build and push Docker image 61 uses: docker/build-push-action@v5 62 with: 63 context: . 64 file: ./apps/aqua/Dockerfile 65 push: ${{ github.event_name != 'pull_request' }} 66 tags: ${{ steps.meta.outputs.tags }} 67 labels: ${{ steps.meta.outputs.labels }} 68 platforms: linux/amd64,linux/arm64 69 cache-from: type=gha 70 cache-to: type=gha,mode=max