Merge pull request #95 from underworldcode/bugfix/vep-barrier-and-is-… #27
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: "GHCR: Command-Line Container" | |
| # Builds the Underworld3 command-line Docker image and pushes to GHCR. | |
| # Uses container/Containerfile (micromamba-based image for local use). | |
| # | |
| # This is separate from binder-image.yml which builds Binder-ready images | |
| # optimized for mybinder.org. | |
| on: | |
| push: | |
| branches: [main, development] | |
| paths: | |
| # Only rebuild when these files change | |
| - 'container/Containerfile' | |
| - 'environment.yaml' | |
| - 'src/**/*.pyx' | |
| - 'src/**/*.c' | |
| - 'setup.py' | |
| - 'pyproject.toml' | |
| workflow_dispatch: | |
| inputs: | |
| force_rebuild: | |
| description: 'Force full rebuild (no cache)' | |
| type: boolean | |
| default: false | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Extract branch name | |
| run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| file: container/Containerfile | |
| platforms: linux/amd64 | |
| no-cache: ${{ inputs.force_rebuild || false }} | |
| tags: | | |
| ghcr.io/underworldcode/underworld3:${{ env.BRANCH }} | |
| ghcr.io/underworldcode/underworld3:latest |