|
| 1 | +name: Build and Push Docker Image for lab single cell |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths: |
| 6 | + - 'session_ml/SingleCell/**' |
| 7 | + branches: |
| 8 | + - OMICSINT_H24 |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + if: github.repository == 'NBISweden/workshop_omics_integration' |
| 15 | + |
| 16 | + steps: |
| 17 | + # Checkout the repository |
| 18 | + - name: Checkout repository |
| 19 | + uses: actions/checkout@v3 |
| 20 | + |
| 21 | + # Set up Docker Buildx for multi-platform builds |
| 22 | + - name: Set up Docker Buildx |
| 23 | + uses: docker/setup-buildx-action@v2 |
| 24 | + |
| 25 | + # Log in to Docker Hub using the secrets |
| 26 | + - name: Log in to Docker Hub |
| 27 | + uses: docker/login-action@v2 |
| 28 | + with: |
| 29 | + username: ${{ secrets.DOCKER_HUB_USERNAME }} |
| 30 | + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} |
| 31 | + |
| 32 | + # Log in to GitHub Container Registry (GHCR) |
| 33 | + - name: Log in to GHCR |
| 34 | + uses: docker/login-action@v2 |
| 35 | + with: |
| 36 | + registry: ghcr.io |
| 37 | + username: ${{ github.actor }} |
| 38 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 39 | + |
| 40 | + # Build and push the Docker image for both amd64 to Docker Hub |
| 41 | + - name: Build and Push Docker Image to Docker Hub |
| 42 | + uses: docker/build-push-action@v4 |
| 43 | + with: |
| 44 | + context: ./session_ml/SingleCell |
| 45 | + file: session_ml/SingleCell/Dockerfile |
| 46 | + platforms: linux/amd64 |
| 47 | + push: true |
| 48 | + no-cache: true |
| 49 | + tags: docker.io/rasoolsnbis/omicsint_h24:session_ml_single_cell_amd |
| 50 | + |
| 51 | + # Build and push the Docker image to GitHub Container Registry (GHCR) |
| 52 | + - name: Build and Push Docker Image to GHCR |
| 53 | + uses: docker/build-push-action@v4 |
| 54 | + with: |
| 55 | + context: ./session_ml/SingleCell |
| 56 | + file: session_ml/SingleCell/Dockerfile |
| 57 | + platforms: linux/amd64 |
| 58 | + push: true |
| 59 | + no-cache: true |
| 60 | + tags: ghcr.io/${{ github.repository_owner }}/omicsint_h24:session_ml_single_cell_amd |
| 61 | + |
| 62 | + - name: Inspect Docker Image |
| 63 | + run: docker buildx imagetools inspect docker.io/rasoolsnbis/omicsint_h24:session_ml_single_cell_amd |
0 commit comments