Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jagapiou authored Sep 12, 2024
1 parent 6e1cf5f commit ef9f110
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .github/actions/install-concordia/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,26 @@ outputs:
runs:
using: composite
steps:
- name: Get current runner
id: os-info
shell: bash
run: |
if [ "${RUNNER_OS}" = 'macOS' ]; then
echo "name=$(sw_vers -productName)" >> $GITHUB_OUTPUT
echo "version=$(sw_vers -productVersion)" >> $GITHUB_OUTPUT
elif [ "${RUNNER_OS}" = 'Linux' ]; then
echo "name=$(lsb_release -i -s)" >> $GITHUB_OUTPUT
echo "version=$(lsb_release -r -s)" >> $GITHUB_OUTPUT
else
exit 1
fi
- name: Set up Python ${{ inputs.python-version }}
id: setup-python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: ${{ inputs.python-version }}

- name: Get cache key
id: cache-key
shell: bash
run: |
echo "cache-key=${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('setup.py') }}" >> $GITHUB_OUTPUT
if [ "${RUNNER_OS}" = 'macOS' ]; then
readonly name="$(sw_vers -productName)"
readonly version="$(sw_vers -productVersion)"
elif [ "${RUNNER_OS}" = 'Linux' ]; then
readonly name="$(lsb_release -i -s)"
readonly version="$(lsb_release -r -s)"
else
exit 1
fi
echo "cache-key=${name}-${version}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('setup.py') }}" >> $GITHUB_OUTPUT
- name: Restore Concordia installation
id: restore
Expand Down

0 comments on commit ef9f110

Please sign in to comment.