@@ -2,24 +2,24 @@ name: Development
22on :
33 push :
44 branches :
5- - ' ** ' # every branch
6- - ' !gh-pages' # exclude gh-pages branch
7- - ' !stage*' # exclude branches beginning with stage
5+ - " ** " # every branch
6+ - " !gh-pages" # exclude gh-pages branch
7+ - " !stage*" # exclude branches beginning with stage
88 tags :
99 - ' \d+\.\d+\.\d+' # only semver tags
1010 pull_request :
1111 branches :
12- - ' ** ' # every branch
13- - ' !gh-pages' # exclude gh-pages branch
14- - ' !stage*' # exclude branches beginning with stage
12+ - " ** " # every branch
13+ - " !gh-pages" # exclude gh-pages branch
14+ - " !stage*" # exclude branches beginning with stage
1515jobs :
1616 build :
1717 runs-on : ubuntu-latest
1818 strategy :
1919 matrix :
2020 include :
21- - py_ver : 3.8
22- distro : alpine
21+ - py_ver : " 3.9 "
22+ distro : debian
2323 image : djbase
2424 env :
2525 PY_VER : ${{matrix.py_ver}}
2828 DOCKER_CLIENT_TIMEOUT : " 120"
2929 COMPOSE_HTTP_TIMEOUT : " 120"
3030 steps :
31- - uses : actions/checkout@v2
31+ - uses : actions/checkout@v3
3232 - name : Validate version and release notes
3333 run : |
3434 DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py)
4444 export HOST_UID=$(id -u)
4545 docker-compose -f docker-compose-build.yaml up --exit-code-from app --build
4646 echo "DJ_VERSION=${DJ_VERSION}" >> $GITHUB_ENV
47- - if : matrix.py_ver == '3.8 ' && matrix.distro == 'alpine '
47+ - if : matrix.py_ver == '3.9 ' && matrix.distro == 'debian '
4848 name : Add pip artifacts
49- uses : actions/upload-artifact@v2
49+ uses : actions/upload-artifact@v3
5050 with :
5151 name : pip-datajoint-${{env.DJ_VERSION}}
5252 path : dist
@@ -55,13 +55,15 @@ jobs:
5555 runs-on : ubuntu-latest
5656 strategy :
5757 matrix :
58- py_ver : ["3.8 "]
58+ py_ver : ["3.9 "]
5959 mysql_ver : ["8.0", "5.7"]
6060 include :
61+ - py_ver : " 3.8"
62+ mysql_ver : " 5.7"
6163 - py_ver : " 3.7"
6264 mysql_ver : " 5.7"
6365 steps :
64- - uses : actions/checkout@v2
66+ - uses : actions/checkout@v3
6567 - name : Set up Python ${{matrix.py_ver}}
6668 uses : actions/setup-python@v4
6769 with :
@@ -75,15 +77,14 @@ jobs:
7577 - name : Run primary tests
7678 env :
7779 PY_VER : ${{matrix.py_ver}}
80+ DJ_PASS : simple
7881 MYSQL_VER : ${{matrix.mysql_ver}}
79- ALPINE_VER : " 3.10 "
82+ DISTRO : alpine
8083 MINIO_VER : RELEASE.2021-09-03T03-56-13Z
84+ DOCKER_CLIENT_TIMEOUT : " 120"
8185 COMPOSE_HTTP_TIMEOUT : " 120"
82- COVERALLS_SERVICE_NAME : travis-ci
83- COVERALLS_REPO_TOKEN : fd0BoXG46TPReEem0uMy7BJO5j0w1MQiY
8486 run : |
8587 export HOST_UID=$(id -u)
86- export HOST_GID=$(id -g)
8788 docker-compose -f LNX-docker-compose.yml up --build --exit-code-from app
8889 - name : Run style tests
8990 run : |
@@ -101,7 +102,7 @@ jobs:
101102 DOCKER_CLIENT_TIMEOUT : " 120"
102103 COMPOSE_HTTP_TIMEOUT : " 120"
103104 steps :
104- - uses : actions/checkout@v2
105+ - uses : actions/checkout@v3
105106 - name : Deploy docs
106107 run : |
107108 export MODE=BUILD
@@ -119,8 +120,8 @@ jobs:
119120 strategy :
120121 matrix :
121122 include :
122- - py_ver : 3.8
123- distro : alpine
123+ - py_ver : " 3.9 "
124+ distro : debian
124125 image : djbase
125126 env :
126127 PY_VER : ${{matrix.py_ver}}
@@ -133,7 +134,7 @@ jobs:
133134 outputs :
134135 release_upload_url : ${{steps.create_gh_release.outputs.upload_url}}
135136 steps :
136- - uses : actions/checkout@v2
137+ - uses : actions/checkout@v3
137138 - name : Set up Python ${{matrix.py_ver}}
138139 uses : actions/setup-python@v4
139140 with :
@@ -160,7 +161,7 @@ jobs:
160161 prerelease : false
161162 draft : false
162163 - name : Fetch pip artifacts
163- uses : actions/download-artifact@v2
164+ uses : actions/download-artifact@v3
164165 with :
165166 name : pip-datajoint-${{env.DJ_VERSION}}
166167 path : dist
@@ -192,3 +193,19 @@ jobs:
192193 docker-compose -f docker-compose-build.yaml run \
193194 -e TWINE_USERNAME=${TWINE_USERNAME} -e TWINE_PASSWORD=${TWINE_PASSWORD} app \
194195 sh -lc "pip install twine && python -m twine upload dist/*"
196+ - name : Login to DockerHub
197+ uses : docker/login-action@v1
198+ with :
199+ username : ${{secrets.docker_username}}
200+ password : ${{secrets.docker_password}}
201+ - name : Publish image
202+ run : |
203+ IMAGE=$(docker images --filter "reference=datajoint/datajoint*" --format "{{.Repository}}")
204+ TAG=$(docker images --filter "reference=datajoint/datajoint*" --format "{{.Tag}}")
205+ docker push "${IMAGE}:${TAG}"
206+ docker tag "${IMAGE}:${TAG}" "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
207+ docker push "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
208+ [ "$PY_VER" == "3.9" ] && [ "$DISTRO" == "debian" ] \
209+ && docker tag "${IMAGE}:${TAG}" "${IMAGE}:latest" \
210+ && docker push "${IMAGE}:latest" \
211+ || echo "skipping 'latest' tag..."
0 commit comments