Fix incorrect GitHub actions path on containers (#78)

Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
This commit is contained in:
Christian Proud
2023-11-29 00:06:28 +08:00
committed by GitHub
parent b4528cf39e
commit ff08d7d467

View File

@@ -96,13 +96,24 @@ runs:
# github and actions/cache doesn't provide a way to update a cache at a given key, so we delete any # github and actions/cache doesn't provide a way to update a cache at a given key, so we delete any
# that match the restore key just before saving the new cache # that match the restore key just before saving the new cache
# Not windows
- uses: pyTooling/Actions/with-post-step@adef08d3bdef092282614f3b683897cefae82ee3 - uses: pyTooling/Actions/with-post-step@adef08d3bdef092282614f3b683897cefae82ee3
if: ${{ inputs.delete-old-caches == 'true' }} if: ${{ inputs.delete-old-caches == 'true' && runner.OS != 'Windows' }}
with: with:
# seems like there has to be a `main` step in this action. Could list caches for info if we wanted # seems like there has to be a `main` step in this action. Could list caches for info if we wanted
# main: julia ${{ github.action_path }}/handle_caches.jl "${{ github.repository }}" "list" # main: julia ${{ github.action_path }}/handle_caches.jl "${{ github.repository }}" "list"
main: echo "" main: echo ""
post: julia ${{ github.action_path }}/handle_caches.jl "${{ github.repository }}" "rm" "${{ steps.keys.outputs.restore-key }}" post: julia $GITHUB_ACTION_PATH/handle_caches.jl "${{ github.repository }}" "rm" "${{ steps.keys.outputs.restore-key }}"
env:
GH_TOKEN: ${{ inputs.token }}
# Windows (because this action uses command prompt on windows)
- uses: pyTooling/Actions/with-post-step@adef08d3bdef092282614f3b683897cefae82ee3
if: ${{ inputs.delete-old-caches == 'true' && runner.OS == 'Windows' }}
with:
main: echo ""
post: cd %GITHUB_ACTION_PATH% && julia handle_caches.jl "${{ github.repository }}" "rm" "${{ steps.keys.outputs.restore-key }}"
env: env:
GH_TOKEN: ${{ inputs.token }} GH_TOKEN: ${{ inputs.token }}