Skip to content
This repository was archived by the owner on Nov 24, 2021. It is now read-only.

Commit 7fff225

Browse files
committed
Initial commit for open-sourcing
0 parents  commit 7fff225

File tree

123 files changed

+37126
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+37126
-0
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
**/.local/
2+
**/node_modules/
3+
**/dist/
4+
**/data/
5+
**/log/
6+
**/input/
7+
**/output/

.github/workflows/ci-basel.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Basel Connector-Build, Test & Publish Docker
2+
on:
3+
push:
4+
paths:
5+
- 'packages/neherlab-covid-19-scenarios/**'
6+
- 'packages/api/**'
7+
8+
env:
9+
IMAGE_NAME: neherlab-covid-19-scenarios-connector
10+
11+
jobs:
12+
# Run tests.
13+
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
14+
test:
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: packages/neherlab-covid-19-scenarios
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Log into registry for Imperial images
24+
run: echo "${{ secrets.GITHUB_PAT }}" | docker login docker.pkg.github.com -u ${{ secrets.GITHUB_PAT_USER }} --password-stdin
25+
26+
- name: Run tests
27+
run: docker-compose build test
28+
29+
publish:
30+
needs: test
31+
runs-on: ubuntu-latest
32+
33+
defaults:
34+
run:
35+
working-directory: packages/neherlab-covid-19-scenarios
36+
37+
strategy:
38+
fail-fast: true
39+
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v1
43+
44+
- name: Log into registry for Docker images
45+
run: echo "${{ secrets.GITHUB_PAT }}" | docker login docker.pkg.github.com -u ${{ secrets.GITHUB_PAT_USER }} --password-stdin
46+
47+
- name: Build image
48+
run: docker-compose build release
49+
50+
- name: Log into registry
51+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
52+
53+
- name: Push image (Local)
54+
run: |
55+
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
56+
# Change all uppercase to lowercase
57+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
58+
# Strip git ref prefix (refs/heads/ or refs/tags/) from version
59+
# but keep the rest of the ref. Replaces / with - to make the package name valid.
60+
# Do not attempt to obtain the version number from vx.y.z tags:
61+
# this is handled by the publish_version workflow.
62+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,refs/\(heads\|tags\)/\(.*\),\2,' | tr '/' '-')
63+
# Always tag with git sha or version tag
64+
echo IMAGE_ID=$IMAGE_ID
65+
echo VERSION=$VERSION
66+
docker tag image $IMAGE_ID:$VERSION
67+
docker push $IMAGE_ID:$VERSION
68+
# Use Docker `latest` tag convention for master.
69+
[ "$VERSION" == "master" ] && VERSION=latest
70+
echo IMAGE_ID=$IMAGE_ID
71+
echo VERSION=$VERSION
72+
docker tag image $IMAGE_ID:$VERSION
73+
docker push $IMAGE_ID:$VERSION

.github/workflows/ci-mc19.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: MC19 Connector-Build, Test & Publish Docker
2+
on:
3+
push:
4+
paths:
5+
- 'packages/modelingcovid-covidmodel/**'
6+
7+
env:
8+
IMAGE_NAME: modelingcovid-covidmodel-connector
9+
10+
jobs:
11+
# Run tests.
12+
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
13+
test:
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: packages/modelingcovid-covidmodel
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Log into registry for Docker images
23+
run: echo "${{ secrets.GITHUB_PAT }}" | docker login docker.pkg.github.com -u ${{ secrets.GITHUB_PAT_USER }} --password-stdin
24+
25+
- name: Run tests
26+
run: docker-compose build test
27+
28+
publish:
29+
needs: test
30+
runs-on: ubuntu-latest
31+
32+
defaults:
33+
run:
34+
working-directory: packages/modelingcovid-covidmodel
35+
36+
strategy:
37+
fail-fast: true
38+
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v1
42+
43+
- name: Log into registry for Docker images
44+
run: echo "${{ secrets.GITHUB_PAT }}" | docker login docker.pkg.github.com -u ${{ secrets.GITHUB_PAT_USER }} --password-stdin
45+
46+
- name: Build image
47+
run: docker-compose build release
48+
49+
- name: Log into registry
50+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
51+
52+
- name: Push image (Local)
53+
run: |
54+
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
55+
# Change all uppercase to lowercase
56+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
57+
# Strip git ref prefix (refs/heads/ or refs/tags/) from version
58+
# but keep the rest of the ref. Replaces / with - to make the package name valid.
59+
# Do not attempt to obtain the version number from vx.y.z tags:
60+
# this is handled by the publish_version workflow.
61+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,refs/\(heads\|tags\)/\(.*\),\2,' | tr '/' '-')
62+
# Always tag with git sha or version tag
63+
echo IMAGE_ID=$IMAGE_ID
64+
echo VERSION=$VERSION
65+
docker tag image $IMAGE_ID:$VERSION
66+
docker push $IMAGE_ID:$VERSION
67+
# Use Docker `latest` tag convention for master.
68+
[ "$VERSION" == "master" ] && VERSION=latest
69+
echo IMAGE_ID=$IMAGE_ID
70+
echo VERSION=$VERSION
71+
docker tag image $IMAGE_ID:$VERSION
72+
docker push $IMAGE_ID:$VERSION
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: MRC-IDE CovidSim Connector-Build, Test & Publish Docker
2+
on:
3+
push:
4+
paths:
5+
- 'packages/mrc-ide-covidsim/**'
6+
- 'packages/api/**'
7+
8+
env:
9+
IMAGE_NAME: mrc-ide-covidsim-connector
10+
11+
jobs:
12+
# Run tests.
13+
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
14+
test:
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: packages/mrc-ide-covidsim
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Log into registry for Docker images
24+
run: echo "${{ secrets.GITHUB_PAT }}" | docker login docker.pkg.github.com -u ${{ secrets.GITHUB_PAT_USER }} --password-stdin
25+
26+
- name: Run tests
27+
run: docker-compose build test
28+
29+
publish:
30+
needs: test
31+
runs-on: ubuntu-latest
32+
33+
defaults:
34+
run:
35+
working-directory: packages/mrc-ide-covidsim
36+
37+
strategy:
38+
fail-fast: true
39+
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v1
43+
44+
- name: Log into registry for Imperial images
45+
run: echo "${{ secrets.GITHUB_PAT }}" | docker login docker.pkg.github.com -u ${{ secrets.GITHUB_PAT_USER }} --password-stdin
46+
47+
- name: Build image
48+
run: docker-compose build release
49+
50+
- name: Log into registry
51+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
52+
53+
- name: Push image (Local)
54+
run: |
55+
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
56+
# Change all uppercase to lowercase
57+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
58+
# Strip git ref prefix (refs/heads/ or refs/tags/) from version
59+
# but keep the rest of the ref. Replaces / with - to make the package name valid.
60+
# Do not attempt to obtain the version number from vx.y.z tags:
61+
# this is handled by the publish_version workflow.
62+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,refs/\(heads\|tags\)/\(.*\),\2,' | tr '/' '-')
63+
# Always tag with git sha or version tag
64+
echo IMAGE_ID=$IMAGE_ID
65+
echo VERSION=$VERSION
66+
docker tag image $IMAGE_ID:$VERSION
67+
docker push $IMAGE_ID:$VERSION
68+
# Use Docker `latest` tag convention for master.
69+
[ "$VERSION" == "master" ] && VERSION=latest
70+
echo IMAGE_ID=$IMAGE_ID
71+
echo VERSION=$VERSION
72+
docker tag image $IMAGE_ID:$VERSION
73+
docker push $IMAGE_ID:$VERSION

.github/workflows/ci.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Model Runner-Build, Test & Publish Docker
2+
on:
3+
push:
4+
paths:
5+
- 'packages/model-runner/**'
6+
- 'packages/api/**'
7+
8+
env:
9+
IMAGE_NAME: model-runner
10+
11+
jobs:
12+
# Run tests.
13+
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
14+
test:
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: packages/model-runner
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Log into registry for Docker images
24+
run: echo "${{ secrets.GITHUB_PAT }}" | docker login docker.pkg.github.com -u ${{ secrets.GITHUB_PAT_USER }} --password-stdin
25+
26+
- name: Run tests
27+
run: docker-compose build test
28+
29+
publish:
30+
needs: test
31+
runs-on: ubuntu-latest
32+
33+
defaults:
34+
run:
35+
working-directory: packages/model-runner
36+
37+
strategy:
38+
fail-fast: true
39+
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v1
43+
44+
- name: Log into registry for Docker images
45+
run: echo "${{ secrets.GITHUB_PAT }}" | docker login docker.pkg.github.com -u ${{ secrets.GITHUB_PAT_USER }} --password-stdin
46+
47+
- name: Build image
48+
run: docker-compose build release
49+
50+
- name: Log into registry
51+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
52+
53+
- name: Push image (Local)
54+
run: |
55+
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
56+
# Change all uppercase to lowercase
57+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
58+
# Strip git ref prefix (refs/heads/ or refs/tags/) from version
59+
# but keep the rest of the ref. Replaces / with - to make the package name valid.
60+
# Do not attempt to obtain the version number from vx.y.z tags:
61+
# this is handled by the publish_version workflow.
62+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,refs/\(heads\|tags\)/\(.*\),\2,' | tr '/' '-')
63+
# Always tag with git sha or version tag
64+
echo IMAGE_ID=$IMAGE_ID
65+
echo VERSION=$VERSION
66+
docker tag image $IMAGE_ID:$VERSION
67+
docker push $IMAGE_ID:$VERSION
68+
# Use Docker `latest` tag convention for master.
69+
[ "$VERSION" == "master" ] && VERSION=latest
70+
echo IMAGE_ID=$IMAGE_ID
71+
echo VERSION=$VERSION
72+
docker tag image $IMAGE_ID:$VERSION
73+
docker push $IMAGE_ID:$VERSION
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Basel Connector-Publish Docker Images for Tags/Releases
2+
on:
3+
push:
4+
# Publish `neherlab-covid-19-scenarios/v1.2.3` tags as `neherlab-covid-19-scenarios-connector` releases.
5+
tags:
6+
- 'neherlab-covid-19-scenarios/v*'
7+
8+
env:
9+
PACKAGE_NAME: neherlab-covid-19-scenarios
10+
IMAGE_NAME: neherlab-covid-19-scenarios-connector
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: packages/neherlab-covid-19-scenarios
18+
19+
strategy:
20+
fail-fast: true
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v1
25+
26+
- name: Log into registry for Imperial images
27+
run: echo "${{ secrets.GITHUB_PAT }}" | docker login docker.pkg.github.com -u ${{ secrets.GITHUB_PAT_USER }} --password-stdin
28+
29+
- name: Build image
30+
run: docker-compose build release
31+
32+
- name: Log into registry
33+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
34+
35+
- name: Push image (Local)
36+
run: |
37+
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
38+
# Change all uppercase to lowercase
39+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
40+
# Strip git ref prefix from version
41+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
42+
# Strip "v" prefix from tag name
43+
[[ "${{ github.ref }}" == "refs/tags/$PACKAGE_NAME"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
44+
# Always tag with git sha or version tag
45+
echo IMAGE_ID=$IMAGE_ID
46+
echo VERSION=$VERSION
47+
docker tag image $IMAGE_ID:$VERSION
48+
docker push $IMAGE_ID:$VERSION

0 commit comments

Comments
 (0)