Merge pull request #4 from nodetool-ai/codex/worker-only-combined-image #4
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 combined non-commercial image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - Dockerfile.combined | |
| - scripts/combined-entrypoint.sh | |
| - scripts/combined-healthcheck.py | |
| - docs/combined-image-licenses.md | |
| - docs/combined-worker.md | |
| - NOTICE.md | |
| - pyproject.toml | |
| - src/** | |
| - .github/workflows/build-combined.yml | |
| permissions: | |
| contents: read | |
| packages: write | |
| concurrency: | |
| group: combined-image-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 180 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@v4 | |
| - name: Reclaim runner disk space | |
| run: | | |
| sudo rm -rf /usr/local/lib/android /opt/ghc /usr/share/dotnet /opt/hostedtoolcache | |
| docker system prune --all --force | |
| df -h / | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and publish combined image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile.combined | |
| platforms: linux/amd64 | |
| provenance: false | |
| push: true | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/nodetool-wan2gp:combined-${{ github.sha }} | |
| ghcr.io/${{ github.repository_owner }}/nodetool-wan2gp:combined-latest | |
| - name: Publish build summary | |
| run: | | |
| echo '## Combined WanGP image' >> "$GITHUB_STEP_SUMMARY" | |
| echo '' >> "$GITHUB_STEP_SUMMARY" | |
| echo 'Free, non-monetized use only. See `docs/combined-image-licenses.md`.' >> "$GITHUB_STEP_SUMMARY" | |
| echo '' >> "$GITHUB_STEP_SUMMARY" | |
| echo '${{ github.sha }}' >> "$GITHUB_STEP_SUMMARY" |