Skip to content

Commit

Permalink
fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
Randomblock1 committed Dec 15, 2020
1 parent d73e7c9 commit ee50b26
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,22 @@ inputs:
description: 'Where to get the SDKs from (git URL)'
required: false
default: 'https://github.com/theos/sdks'
use-cache:
description: 'Whether to cache the SDKs or not (true/false)'
required: false
default: true
runs:
using: "composite"
steps:
- name: prepare environment
shell: bash
run: |
brew install ldid make
echo "THEOS=$GITHUB_WORKSPACE/${{ inputs.theos-dir }}" >> $GITHUB_ENV
echo "PATH=$PATH:/usr/local/opt/make/libexec/gnubin" >> $GITHUB_ENV
- name: verify updated cache
id: verify-cache
if: inputs.use-cache = 'true'
run: |
echo "::set-output name=theos-heads::`git ls-remote ${{ inputs.theos-src }} | head -n 1 | cut -f 1`-`git ls-remote ${{ inputs.theos-sdks }} | head -n 1 | cut -f 1`"
- name: use cache
id: cache
if: inputs.use-cache = 'true'
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/${{ inputs.theos-dir }}
key: ${{ runner.os }}-${{ steps.verify-cache.outputs.theos-heads }}

- name: get theos
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: |
git clone ${{ inputs.theos-src }} ${{ github.workspace }}/${{ inputs.theos-dir }} --recursive
- name: get sdks
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: |
git clone ${{ inputs.theos-sdks }} ${{ github.workspace }}/${{ inputs.theos-dir }}/sdks --depth=1

0 comments on commit ee50b26

Please sign in to comment.