From 89bc16c93b124cf7be69bb49da82c97704d53535 Mon Sep 17 00:00:00 2001 From: Florian Dobener Date: Wed, 12 Jun 2024 09:52:39 +0200 Subject: [PATCH] Use ref_name if head_ref is not present (#348) --- .github/workflows/nomad-requirements.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nomad-requirements.yml b/.github/workflows/nomad-requirements.yml index 5536c756e..72d8e0ab3 100644 --- a/.github/workflows/nomad-requirements.yml +++ b/.github/workflows/nomad-requirements.yml @@ -24,11 +24,11 @@ jobs: run: | git clone --depth 1 --branch develop --recurse-submodules https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git nomad git submodule update --init --recursive --depth 1 - + - name: Replace pynxtools dependency in NOMAD pyproject.toml working-directory: ./nomad run: | - sed -i 's|pynxtools\[convert\]==[0-9]\+\(\.[0-9]\+\)\{0,2\}|pynxtools\[convert\]@git+https://github.com/FAIRmat-NFDI/pynxtools.git@${{ github.head_ref }}|' pyproject.toml + sed -i 's|pynxtools\[convert\]==[0-9]\+\(\.[0-9]\+\)\{0,2\}|pynxtools\[convert\]@git+https://github.com/FAIRmat-NFDI/pynxtools.git@${{ github.head_ref || github.ref_name }} |' pyproject.toml - name: Set up Python uses: actions/setup-python@v2 @@ -37,7 +37,7 @@ jobs: - name: Install uv run: | - curl -LsSf https://astral.sh/uv/install.sh | sh + curl -LsSf https://astral.sh/uv/install.sh | sh - name: Generate (dev-)requirements.txt from modified pyproject.toml working-directory: ./nomad