Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tar fails with current directory, reporting "file changed as we read it" #48

Closed
harry75369 opened this issue Sep 8, 2023 · 0 comments
Closed

Comments

@harry75369
Copy link

harry75369 commented Sep 8, 2023

This problem is due to tar command itself. Running and saving file in the current directory will simply reproduce this problem:

$ tar czvf test.tar.gz .  # tar: .: file changed as we read it

Neither --exclude=test.tar.gz nor --ignore-failed-read works.

The only workaround is to save tar file in an excluded dir, like this

$ mkdir -p github-release
$ tar --exclude=github-release -czvf github-release/test.tar.gz .

So as for this action, it could be written like this (if you want to use tar)

name: Create Archive
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Create release folder
      run: mkdir -p github-release

    - uses: actions/checkout@master
    - name: Archive Release
      uses: thedoctor0/zip-release@0.7.1
      with:
        type: 'tar'
        filename: 'github-release/release.tar.gz'
        exclusions: 'github-release .git'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant