Skip to content

Check

Check #365

Workflow file for this run

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 }}