Skip to content

Commit

Permalink
v1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels authored Jan 20, 2025
2 parents 9157364 + 4658ed8 commit e734994
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 111 deletions.
125 changes: 63 additions & 62 deletions .github/workflows/ArtifactsUpload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -92,9 +92,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -127,9 +127,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -162,9 +162,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -199,9 +199,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -238,9 +238,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -275,9 +275,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -310,9 +310,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -348,9 +348,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -387,9 +387,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -426,9 +426,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }

steps:
- name: ⏬ Checkout repository to use local actions
Expand Down Expand Up @@ -469,9 +469,10 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14' }
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
- {icon: '🍏', name: 'macOS', image: 'macos-14' }
- {icon: '🪟', name: 'Windows', image: 'windows-2022'}

defaults:
run:
shell: bash
Expand Down Expand Up @@ -543,10 +544,10 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
task:
- {'name': 'inspect', 'artifact': 'github', 'action': 'actions/upload-artifact'}
- {'name': 'verify' , 'artifact': 'pyTooling', 'action': 'pyTooling/upload-artifact'}
- {name: 'inspect', artifact: 'github', action: 'actions/upload-artifact'}
- {name: 'verify' , artifact: 'pyTooling', action: 'pyTooling/upload-artifact'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -597,10 +598,10 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
task:
- {'name': 'inspect', 'artifact': 'github', 'action': 'actions/upload-artifact'}
- {'name': 'verify' , 'artifact': 'pyTooling', 'action': 'pyTooling/upload-artifact'}
- {name: 'inspect', artifact: 'github', action: 'actions/upload-artifact'}
- {name: 'verify' , artifact: 'pyTooling', action: 'pyTooling/upload-artifact'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -653,10 +654,10 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
task:
- {'name': 'inspect', 'artifact': 'github', 'action': 'actions/upload-artifact'}
- {'name': 'verify' , 'artifact': 'pyTooling', 'action': 'pyTooling/upload-artifact'}
- {name: 'inspect', artifact: 'github', action: 'actions/upload-artifact'}
- {name: 'verify' , artifact: 'pyTooling', action: 'pyTooling/upload-artifact'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -709,10 +710,10 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
task:
- {'name': 'inspect', 'artifact': 'github', 'action': 'actions/upload-artifact'}
- {'name': 'verify' , 'artifact': 'pyTooling', 'action': 'pyTooling/upload-artifact'}
- {name: 'inspect', artifact: 'github', action: 'actions/upload-artifact'}
- {name: 'verify' , artifact: 'pyTooling', action: 'pyTooling/upload-artifact'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -769,10 +770,10 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
task:
- {'name': 'inspect', 'artifact': 'github', 'action': 'actions/upload-artifact'}
- {'name': 'verify' , 'artifact': 'pyTooling', 'action': 'pyTooling/upload-artifact'}
- {name: 'inspect', artifact: 'github', action: 'actions/upload-artifact'}
- {name: 'verify' , artifact: 'pyTooling', action: 'pyTooling/upload-artifact'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -821,10 +822,10 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
task:
- {'name': 'inspect', 'artifact': 'github', 'action': 'actions/upload-artifact'}
- {'name': 'verify' , 'artifact': 'pyTooling', 'action': 'pyTooling/upload-artifact'}
- {name: 'inspect', artifact: 'github', action: 'actions/upload-artifact'}
- {name: 'verify' , artifact: 'pyTooling', action: 'pyTooling/upload-artifact'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -877,10 +878,10 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
task:
- {'name': 'inspect', 'artifact': 'github', 'action': 'actions/upload-artifact'}
- {'name': 'verify' , 'artifact': 'pyTooling', 'action': 'pyTooling/upload-artifact'}
- {name: 'inspect', artifact: 'github', action: 'actions/upload-artifact'}
- {name: 'verify' , artifact: 'pyTooling', action: 'pyTooling/upload-artifact'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -943,10 +944,10 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
task:
- {'name': 'inspect', 'artifact': 'github', 'action': 'actions/upload-artifact'}
- {'name': 'verify' , 'artifact': 'pyTooling', 'action': 'pyTooling/upload-artifact'}
- {name: 'inspect', artifact: 'github', action: 'actions/upload-artifact'}
- {name: 'verify' , artifact: 'pyTooling', action: 'pyTooling/upload-artifact'}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -1003,9 +1004,9 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04'}
task:
- {'name': 'verify' , 'artifact': 'pyTooling', 'action': 'pyTooling/upload-artifact'}
- {name: 'verify' , artifact: 'pyTooling', action: 'pyTooling/upload-artifact'}
defaults:
run:
shell: bash
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![GitHub Workflow - Build and Test Status](https://img.shields.io/github/actions/workflow/status/pyTooling/upload-artifact/.github%2Fworkflows%2FArtifactsUpload.yml?branch=dev&logo=githubactions)](https://GitHub.com/pyTooling/upload-artifact/actions/workflows/ArtifactsUpload.yml)
[![Sourcecode License](https://img.shields.io/badge/code-MIT%20License-green?longCache=true&style=flat-square&logoColor=fff)](LICENSE.md)

# Artifact Upload Action with File Permission Preservation

This composite action, based on [`actions/upload-artifact`](https://github.com/actions/upload-artifact) and packaging
Expand Down Expand Up @@ -95,19 +98,27 @@ jobs:

## Limitations of `tar`

This action uses `tar` as provided by the GitHub runner's operating system images.
This composite action uses `tar`/`gtar` (GNU tar) as provided by the GitHub runner's operating system images.

### On Linux and Windows (GNU tar)
### On Linux, macOS and Windows (GNU tar)

To ensure files starting with a dash aren't considered command line options to `tar`, `tar` is called with
`--verbatim-files-from` option.

To ensure files are extracted and assigned to the owner/group of the extracting user, options `--owner=root:0` and
`--group=root:0` are used when creating the tarball.

In case, parameter `include-hidden-files` isn't set, hidden files (dot-files) are removed from the tarball in a further
cleanup step using the `--delete` command. This step is needed to ensure compatibility with the original
`actions/upload-artifact` action provided by GitHub.

### Alternative BSD tar on macOS

### On macOS (BSD tar)
BSD tar has even worse limitations than GNU tar and offers fewer features. Thus, this composite action uses GNU tar on
macOS, too. Fortunately, GNU tar (`gtar`) is already preinstalled via homebrew on all macOS runner images provided by
GitHub. For more details on BSD tar expand the following collapsible section.

<details><summary>Unused BSD tar on macOS </summary>
⚠ BSD tar doesn't support a `--delete` option. Thus, hidden files (dot files) can't be removed (excluded) from tarballs.
Removing discovered hidden files afterward from created tarballs is used on runner OS providing GNU tar. This technique
can't be applied to BSD tar. [^2]
Expand All @@ -126,7 +137,7 @@ as a command line option.

To ensure files are extracted and assigned to the owner/group of the extracting user, options `--gname=root`, `--gid=0`,
`--uname=root` and `--uid=0` are used when creating the tarball.

</details>

## Dependencies

Expand Down
Loading

0 comments on commit e734994

Please sign in to comment.