Merge pull request #1 from OmniBioAI/docs/readme-links-and-structure #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build & Publish Docker Image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: read | |
| packages: write | |
| concurrency: | |
| group: docker-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-push: | |
| name: Build & push to ghcr.io | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU (for multi-platform builds) | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (OCI labels & tags) | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/omnibioai/omnibioai-launcher | |
| tags: | | |
| # branch push → latest | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | |
| # version tag v1.2.3 → 1.2.3 and latest | |
| type=semver,pattern={{version}} | |
| type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }} | |
| labels: | | |
| org.opencontainers.image.title=OmniBioAI Launcher | |
| org.opencontainers.image.description=React-based launcher UI for the OmniBioAI platform | |
| org.opencontainers.image.source=https://github.com/OmniBioAI/omnibioai-launcher | |
| org.opencontainers.image.licenses=MIT | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=registry,ref=ghcr.io/omnibioai/omnibioai-launcher:buildcache | |
| cache-to: type=registry,ref=ghcr.io/omnibioai/omnibioai-launcher:buildcache,mode=max | |
| - name: Make package public | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh api \ | |
| --method PATCH \ | |
| -H "Accept: application/vnd.github+json" \ | |
| /user/packages/container/omnibioai-launcher/versions \ | |
| 2>/dev/null || true | |
| gh api \ | |
| --method PATCH \ | |
| -H "Accept: application/vnd.github+json" \ | |
| /orgs/OmniBioAI/packages/container/omnibioai-launcher \ | |
| -f visibility=public \ | |
| 2>/dev/null || \ | |
| gh api \ | |
| --method PATCH \ | |
| -H "Accept: application/vnd.github+json" \ | |
| /user/packages/container/omnibioai-launcher \ | |
| -f visibility=public \ | |
| 2>/dev/null || true |