tar fails with current directory, reporting "file changed as we read it"
harry75369 opened this issue · comments
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'