-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding GitHub action to build and push both containers upon PR
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 | ||