Skip to content

Commit b07ddc1

Browse files
committed
Copy the requirements file locally
1 parent bd809ff commit b07ddc1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

action.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,26 @@ description: A GitHub Action to validate a compstate.
33
runs:
44
using: composite
55
steps:
6+
- name: Copy requirements locally
7+
id: copy-requirements
8+
shell: bash
9+
run:
10+
# `cache-dependency-path` seems to need to be within the current directory. Use a temporary directory
11+
#
12+
tempdir=$(mktemp --directory --tmpdir=. --suffix=-srcomp-validate-action)
13+
cp ${{ github.action_path }}/requirements.txt $tempdir/requirements.txt
14+
echo "::set-output name=directory::${tempdir}"
15+
616
- name: Set up Python
717
uses: actions/setup-python@v3
818
with:
919
python-version: '3.10'
1020
cache: pip
11-
cache-dependency-path: ${{ github.action_path }}/requirements.txt
21+
cache-dependency-path: ${{ steps.copy-requirements.outputs.directory }}/requirements.txt
1222

1323
- name: Install Dependencies
1424
shell: bash
15-
run: pip install -U -r ${{ github.action_path }}/requirements.txt
25+
run: pip install -U -r ${{ steps.copy-requirements.outputs.directory }}/requirements.txt
1626

1727
- name: Run Compstate Validation
1828
shell: bash

0 commit comments

Comments
 (0)