-
Notifications
You must be signed in to change notification settings - Fork 2
91 lines (76 loc) · 3.45 KB
/
desc-python-dev.yml
File metadata and controls
91 lines (76 loc) · 3.45 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
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
83
84
85
86
87
88
89
90
91
name: desc-python dev
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
schedule:
- cron: '45 20 * * 1'
jobs:
build:
name: Build on Ubuntu
if: ${{ !(github.head_ref == 'actions/update-export') }}
runs-on: ubuntu-20.04
steps:
- name: Check ref
run: echo ${{github.head_ref}}
- name: Check Disk Space
run: df -h && sudo apt-get clean && df -h
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: checkout desc-python
uses: actions/checkout@v3
with:
ref: ''
fetch-depth: 1
- name: Docker login
uses: docker/login-action@v1
with:
username: heather999
password: '${{ secrets.DOCKERHUB_ACCESSTOK }}'
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
builder: '${{ steps.buildx.outputs.name }}'
context: .
file: ./Dockerfile
build-args: |
GH_SHA=${{ github.sha }}
load: true
push: false
tags: lsstdesc/desc-python:dev
# - name: GH token
# uses: tibdex/github-app-token@v1
# id: generate-token
# with:
# app_id: ${{ secrets.APP_ID }}
# private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Test desc-python dev
run: docker run --rm lsstdesc/desc-python:dev /bin/bash -c "source /opt/desc/py/etc/profile.d/conda.sh && conda activate desc && python -c 'import pyccl'"
- name: Docker push
run: docker push lsstdesc/desc-python:dev
- name: Create export yaml
run: |
docker run --rm -v $PWD/conda/dev:/tmp/desc lsstdesc/desc-python:dev /bin/bash -c "source /opt/desc/py/etc/profile.d/conda.sh && conda activate desc && conda env export --no-builds > /tmp/desc/desc-python-dev-env-nersc-install-nobuildinfo.yml"
sed -i "/helpers/c\ - https://bitbucket.org/yymao/helpers/get/v0.3.2.tar.gz" $PWD/conda/dev/desc-python-dev-env-nersc-install-nobuildinfo.yml
sed -i "/descqa/c\ - https://github.com/LSSTDESC/descqa/archive/v2.0.0-0.7.0.tar.gz" $PWD/conda/dev/desc-python-dev-env-nersc-install-nobuildinfo.yml
sed -i "/fofcatalogmatching/c\ - https://github.com/yymao/FoFCatalogMatching/archive/v0.1.0.tar.gz" $PWD/conda/dev/desc-python-dev-env-nersc-install-nobuildinfo.yml
sed -i "/stile/c\ - https://github.com/msimet/Stile/archive/v0.1.tar.gz" $PWD/conda/dev/desc-python-dev-env-nersc-install-nobuildinfo.yml
sed -i "/catalogmatcher/c\ - https://github.com/LSSTDESC/CatalogMatcher/archive/master.tar.gz" $PWD/conda/dev/desc-python-dev-env-nersc-install-nobuildinfo.yml
sed -i "/parsl/c\ - git+https://github.com/Parsl/parsl.git@desc" $PWD/conda/dev/desc-python-dev-env-nersc-install-nobuildinfo.yml
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
token: ${{ secrets.DESC_PYTHON_PAT }}
commit-message: update conda export
title: "[bot] [skip actions] update conda export"
body: |
This is an auto-generated PR to update export yaml .
branch: actions/update-export
labels: 'Type: Install'