Merge branch 'master' of https://github.com/vastgroup/vast-tools #18
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
name: Publish Docker image (latest) | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
# Default branches below | |
- main | |
- master | |
jobs: | |
push_to_registries: | |
name: Push Docker image to multiple registries | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Log in to GitHub Docker Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Build Docker | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ghcr.io/${{ github.repository_owner }}/vast-tools:latest | |
- | |
name: Sleep for 30 seconds | |
uses: whatnick/wait-action@master | |
with: | |
time: '30s' | |
- | |
name: Testing Docker image | |
uses: addnab/docker-run-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
image: ${{ github.repository_owner }}/vast-tools:latest | |
options: -v ${{ github.workspace }}/db:/VASTDB -v ${{ github.workspace }}/share:/share -v ${{ github.workspace }}/tests:/tests | |
run: | | |
echo "Download DB" | |
cd /VASTDB | |
curl --silent --remote-name https://vastdb.crg.eu/libs/vastdb.hsa.16.02.18.tar.gz | |
tar zxf vastdb.hsa.16.02.18.tar.gz | |
rm vastdb.hsa.16.02.18.tar.gz | |
echo "Running test" | |
mkdir -p /share/reads | |
mkdir -p /share/out | |
cp /tests/data/NewFQ_Test_Hsa-51/NewFQ_Test_Hsa-51.fq.gz /share/reads | |
vast-tools align /share/reads/NewFQ_Test_Hsa-51.fq.gz -sp Hsa --expr -o /share/out/test | |
bash /tests/tests.sh /tests/data /share/out/test | |
- | |
name: Push Docker | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
${{ secrets.DOCKERHUB_ACCOUNT }}/vast-tools:latest | |
ghcr.io/${{ github.repository_owner }}/vast-tools:latest |