Skip to content

Update compiled results #155

Update compiled results

Update compiled results #155

name: Create GenX op inputs
on: [push, pull_request] # Triggers on push or pull request events
jobs:
run_script:
runs-on: ubuntu-latest # Specifies the runner environment
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Environment with Micromamba
uses: mamba-org/setup-micromamba@main
with:
environment-file: environment.yml
cache-environment: true
init-shell: bash
post-cleanup: 'all'
- name: Configure Git
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global rebase.autoStash true
- name: Find directories and run script using snakemake
run: |
cd bin
python refresh_op_inputs.py
- name: Check for modified files
id: git-check
run: |
echo "modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT
if git diff-index --quiet HEAD --; then echo "no changed files"; else echo "some changed files"; fi
- name: Add changes
if: steps.git-check.outputs.modified == 'true'
run: |
git pull --rebase
git add .
git commit -m "Create op inputs"
echo "Commit done"
- name: Push changes to repository
if: steps.git-check.outputs.modified == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}