-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.22 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
name: Check
on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
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: execute py script
run: |
echo `pwd`
python -m packaging
if [ -z "$(git status --porcelain)" ]; then
echo "Working directory clean"
else
echo "Changes detected"
ls -lR
cat environments/seamm.yml
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 }}