Skip to content

Commit

Permalink
Adding GitHub action to build and push both containers upon PR
Browse files Browse the repository at this point in the history
  • Loading branch information
tefirman committed Feb 5, 2024
1 parent 369d370 commit 33ae13e
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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

0 comments on commit 33ae13e

Please sign in to comment.