From 62b15702939893a237ce1623683bca3528c1aecb Mon Sep 17 00:00:00 2001 From: Sascha Mann Date: Sun, 26 Dec 2021 15:24:15 +0100 Subject: [PATCH] Add action.yml --- action.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..d0c750b --- /dev/null +++ b/action.yml @@ -0,0 +1,29 @@ +name: 'Cache Julia Artifacts' +description: 'Cache Julia artifacts using actions/cache' + +inputs: + cache-name: + description: 'Name used as part of the cache keys' + default: 'cache-artifacts' + +outputs: + cache-hit: + description: 'A boolean value to indicate an exact match was found for the primary key. Forwarded from actions/cache' + +runs: + using: 'composite' + steps: + - uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed + id: cache + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ inputs.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ inputs.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + + - run: echo "::set-output name=cache-hit::$CACHE_HIT" + env: + CACHE_HIT: ${{ steps.cache.outputs.cache-hit }} + shell: bash