Skip to content

Adding GitHub Action for Docker container build and push #1

Adding GitHub Action for Docker container build and push

Adding GitHub Action for Docker container build and push #1

Workflow file for this run

name: Docker Build and Upload CI
on:
push:
branches:
- 'main'
permissions:
contents: read
packages: write
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and Push
run: |
docker build --platform linux/amd64 -t ghcr.io/getwilds/samtools:1.11 -f Dockerfile_samtools .
docker run ghcr.io/getwilds/samtools:1.11
docker push ghcr.io/getwilds/samtools:1.11
docker build --platform linux/amd64 -t ghcr.io/getwilds/gatk:4.3.0.0 -f Dockerfile_gatk .
docker run ghcr.io/getwilds/gatk:4.3.0.0
docker push ghcr.io/getwilds/gatk:4.3.0.0