-
Notifications
You must be signed in to change notification settings - Fork 29
82 lines (82 loc) · 2.67 KB
/
docker-latest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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