-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (32 loc) · 1.21 KB
/
desc-python-ubuntu.yml
File metadata and controls
34 lines (32 loc) · 1.21 KB
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
name: desc-python-ubuntu
on:
# pull_request:
# branches:
# - bleed
workflow_dispatch:
jobs:
build:
name: Build on Ubuntu
runs-on: ubuntu-20.04
steps:
- name: Check Disk Space
run: df -h && sudo apt-get clean && df -h
- name: Docker login
run: echo '${{ secrets.DOCKERHUB_ACCESSTOK }}' | docker login --username heather999 --password-stdin
- name: checkout desc-python
uses: actions/checkout@v2
with:
ref: ''
fetch-depth: 1
- name : Docker prune
run: sudo docker system prune && df -h
- name : Get date
run: |
echo "DATE_TAG=$(date "+%F")" >> $GITHUB_ENV
# echo "PR_NUM=${{github.event.number}}" >> $GITHUB_ENV
- name: do docker build
run: docker build --no-cache -t lsstdesc/desc-python:bleed-ubuntu-${{env.DATE_TAG}} -f $GITHUB_WORKSPACE/ubuntu/Dockerfile .
- name: test pyccl
run: docker run --rm lsstdesc/desc-python:bleed-ubuntu-${{env.DATE_TAG}} /bin/bash -c "source /usr/local/py/etc/profile.d/conda.sh && conda activate desc && python -c 'import pyccl'"
- name: Docker push
run: docker push lsstdesc/desc-python:bleed-ubuntu-${{env.DATE_TAG}}