-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (86 loc) · 2.86 KB
/
Check.yaml
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
92
93
94
95
96
97
name: Check
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * *'
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: install python packages
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: git credentials
uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
token: '${{ secrets.GITHUB_TOKEN }}'
- name: create environment file
run: |
echo `pwd`
cd
echo `pwd`
ls -l
create_full_environment_file
cat test.yml
# More info on options: https://github.com/conda-incubator/setup-miniconda
- name: create conda environment
uses: conda-incubator/setup-miniconda@v3
with:
installation-dir: ~/
environment-file: ../../../test.yml
activate-environment: seamm
auto-update-conda: false
auto-activate-base: false
show-channel-urls: true
- name: execute py script
shell: bash -l {0}
run: |
ls -l ~/
echo "#############################"
echo `pwd`
echo "#############################"
ls -l
echo "#############################"
conda list
echo "#############################"
echo `check_for_changes`
if [ -z "$(git status --porcelain)" ]; then
echo "Working directory clean"
else
echo "Changes detected"
echo "##############################################################"
git status --porcelain
echo "##############################################################"
ls -lR
echo "##############################################################"
echo "seamm.yml file:"
echo ""
cat environments/seamm.yml
echo "##############################################################"
echo ""
echo "\nseamm_pinned.yml file:"
echo ""
cat environments/seamm_pinned.yml
echo "##############################################################"
echo ""
echo "Does commit_message.txt exist?"
ls -l commit_message.txt
echo ""
git commit -a -F commit_message.txt
git push
# Create release
version=$(date '+%Y.%m.%d' | sed -e 's/\.0/./g')
gh release create -F commit_message.txt $version
gh workflow run Release.yaml
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZENODO_TOKEN: ${{ secrets.ZENODO_TOKEN }}