name: Upload artifact description: Wrapper around GitHub's official action, with additional archiving before upload # https://github.com/actions/upload-artifact/blob/main/action.yml inputs: name: description: Artifact name required: true path: description: One or more files, directories or wildcard pattern that describes what to upload required: true if-no-files-found: description: > The desired behavior if no files are found using the provided path. Available Options: warn: Output a warning but do not fail the action error: Fail the action with an error message ignore: Do not output any warnings or errors, the action does not fail required: false default: warn retention-days: description: > Duration after which artifact will expire in days. 0 means using default retention. Minimum 1 day. Maximum 90 days unless changed from the repository settings page. required: false default: '0' runs: using: composite steps: - name: Archive artifacts run: tar -hcvf ${{ inputs.name }}.tar $(echo "${{ inputs.path }}" | tr '\n' ' ') shell: bash - name: Upload artifacts uses: actions/upload-artifact@v3 with: if-no-files-found: ${{ inputs.if-no-files-found }} name: ${{ inputs.name }} path: ${{ inputs.name }}.tar retention-days: ${{ inputs.retention-days }} - name: Remove archive run: rm -f ${{ inputs.name }}.tar shell: bash