- docker GitHub workflow #2
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: docker | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| target: [docker, singularity] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Docker buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker Hub authentication | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| target: ${{matrix.target}} | |
| tags: gcodega/matmul:cuda12.4-${{matrix.target}} | |
| cache-to: type=inline | |
| cache-from: | | |
| type=registry, ref=gcodega/matmul:cuda12.4-docker | |
| type=registry, ref=gcodega/matmul:cuda12.4-singularity | |
| push: true |