Skip to content

Commit

Permalink
Merge pull request #2 from crabnebula-dev/feat/cache-ttl
Browse files Browse the repository at this point in the history
feat: set cache TTL to 1 day
  • Loading branch information
lucasfernog-crabnebula authored Aug 14, 2024
2 parents 4721254 + d945c43 commit 1e818ff
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,22 @@ outputs:
runs:
using: 'composite'
steps:
- name: Get current date
shell: bash
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if: runner.os == 'Linux' || runner.os == 'macOS'

- name: Get current date
shell: pwsh
if: runner.os == 'Windows'
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Cache CLI
id: restore-cache
uses: actions/cache/restore@v4
with:
path: ${{ inputs.path }}/cn
key: ${{ runner.os }}-${{ runner.arch }}-cn
key: ${{ runner.os }}-${{ runner.arch }}-cn-${{ env.CURRENT_DATE }}

- name: Download CLI (Linux)
shell: bash
Expand Down

0 comments on commit 1e818ff

Please sign in to comment.