Skip to content

Commit

Permalink
tweak tar since it doesn't support ignore-failed-read
Browse files Browse the repository at this point in the history
  • Loading branch information
mangini committed Aug 2, 2024
1 parent 1681dc7 commit 763f88e
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/bcny-firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,25 @@ jobs:
-D FLATBUFFERS_FLATC_EXECUTABLE=${{ github.workspace }}/BinaryCache/flatbuffers/Release/flatc.exe

- name: compress binarycache
run: tar --ignore-failed-read -cvf ${{ github.workspace }}/binary_cache.tar ${{ github.workspace }}/BinaryCache/firebase
run: |
# Define the directory to archive
$directory = "${{ github.workspace }}\BinaryCache\firebase"
# Get all files in the directory recursively
$files = Get-ChildItem -Path $directory -Recurse -File
# Filter out files that cannot be read
$readableFiles = $files | Where-Object { Test-Path $_.FullName -PathType Leaf }
# Create a temporary file to list readable files
$tempFileList = [System.IO.Path]::GetTempFileName()
$readableFiles | ForEach-Object { $_.FullName } | Set-Content $tempFileList
# Create the tar archive
tar -cf ${{ github.workspace }}/binary_cache.tar -T $tempFileList
# Clean up the temporary file
Remove-Item $tempFileList
- name: upload binarycache
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 763f88e

Please sign in to comment.