WIP! A BB-style forum, on the ATmosphere! We're still working... we'll be back soon when we have something to show off!
node typescript hono htmx atproto
at atb-53-theme-resolution 74 lines 2.4 kB view raw
1name: Build and Publish 2 3# Trigger on push to main branch or version tags (v*) 4# Runs CI checks first, then builds and publishes to ATCR if checks pass 5on: 6 push: 7 branches: 8 - main 9 tags: 10 - 'v*' 11 12jobs: 13 # Run CI checks first 14 ci: 15 uses: ./.github/workflows/ci.yml 16 17 # Only publish if CI passes 18 publish: 19 name: Build and Push Docker Image 20 needs: ci 21 runs-on: ubuntu-latest 22 23 steps: 24 - name: Checkout code 25 uses: actions/checkout@v4 26 27 # Set up Docker Buildx for advanced build features 28 # Enables BuildKit and layer caching 29 - name: Set up Docker Buildx 30 uses: docker/setup-buildx-action@v3 31 32 # Authenticate to AT Container Registry 33 # Needs secrets configured 34 - name: Log in to AT Container Registry 35 uses: docker/login-action@v3 36 with: 37 registry: atcr.io 38 username: ${{ secrets.TANGLED_HANDLE }} 39 password: ${{ secrets.APP_PASSWORD }} 40 41 # Extract metadata for Docker tags and labels 42 # Automatically generates appropriate tags based on trigger: 43 # - Push to main: latest + main-<sha> 44 # - Push tag v1.2.3: v1.2.3 + 1.2 + latest 45 - name: Extract Docker metadata 46 id: meta 47 uses: docker/metadata-action@v5 48 with: 49 images: atcr.io/malpercio.dev/atbb 50 tags: | 51 # Tag with branch name (main) 52 type=ref,event=branch 53 # Tag with full semantic version (v1.2.3 → 1.2.3) 54 type=semver,pattern={{version}} 55 # Tag with major.minor version (v1.2.3 → 1.2) 56 type=semver,pattern={{major}}.{{minor}} 57 # Tag with git SHA for main branch (main-abc123) 58 type=sha,prefix=main-,format=short 59 # Tag as latest for default branch (main) 60 type=raw,value=latest,enable={{is_default_branch}} 61 62 # Build multi-stage Dockerfile and push to ATCR 63 # Uses GitHub Actions cache for faster builds 64 - name: Build and push Docker image 65 uses: docker/build-push-action@v5 66 with: 67 context: . 68 push: true 69 tags: ${{ steps.meta.outputs.tags }} 70 labels: ${{ steps.meta.outputs.labels }} 71 # Use GitHub Actions cache for BuildKit layers 72 # Dramatically speeds up subsequent builds 73 cache-from: type=gha 74 cache-to: type=gha,mode=max