aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-11-06 15:35:18 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-11-06 15:35:18 -0800
commitfe92a89b93eca43e75000f39edbb7bc35f0ac51b (patch)
treeaebd05ea43bbac89c994cfd555fb519f731f82f8
parent1cb5a7324343c2c7980e0d2d0aeab74ebc602689 (diff)
downloadbun-fe92a89b93eca43e75000f39edbb7bc35f0ac51b.tar.gz
bun-fe92a89b93eca43e75000f39edbb7bc35f0ac51b.tar.zst
bun-fe92a89b93eca43e75000f39edbb7bc35f0ac51b.zip
Pass `tar -C`
-rw-r--r--.github/actions/upload-files/action.yml47
-rw-r--r--.github/workflows/bun-mac-aarch64.yml4
-rw-r--r--.github/workflows/bun-mac-x64-baseline.yml4
-rw-r--r--.github/workflows/bun-mac-x64.yml4
4 files changed, 53 insertions, 6 deletions
diff --git a/.github/actions/upload-files/action.yml b/.github/actions/upload-files/action.yml
new file mode 100644
index 000000000..c4a343175
--- /dev/null
+++ b/.github/actions/upload-files/action.yml
@@ -0,0 +1,47 @@
+name: "Upload Tar Artifact"
+description: "Compress files with tar prior to artifacting to keep file privileges."
+
+inputs:
+ name:
+ description: "Artifact name"
+ default: "artifact"
+ required: false
+ path:
+ description: >
+ A file, directory or wildcard pattern that describes what to upload.
+ Note: The path provided will be maintained through tar, so after download-tartifact, and subfolder structure will remain intact.
+ 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
+ default: "warn"
+ required: false
+ 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
+
+runs:
+ using: "composite"
+ steps:
+ - run: |
+ shopt -s globstar
+ rm -rf artifact.tar
+ tar -cvf artifact.tar -C ${{ inputs.path }}
+ shell: bash
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: ${{ inputs.name }}
+ path: artifact.tar
+ if-no-files-found: ${{ inputs.if-no-files-found }}
+ retention-days: ${{ inputs.retention-days }}
+
+ - run: rm artifact.tar
+ shell: "bash"
diff --git a/.github/workflows/bun-mac-aarch64.yml b/.github/workflows/bun-mac-aarch64.yml
index a38e0482e..b7601cbd9 100644
--- a/.github/workflows/bun-mac-aarch64.yml
+++ b/.github/workflows/bun-mac-aarch64.yml
@@ -199,13 +199,13 @@ jobs:
make -j $(sysctl -n hw.ncpu) release-bindings
- name: Upload C++
if: matrix.compile_obj
- uses: alehechka/upload-tartifact@v1
+ uses: ./.github/actions/upload-files
with:
name: ${{ matrix.tag }}-cpp
path: ${{ runner.temp }}/bun-cpp-obj
- name: Upload Dependencies
if: matrix.dependencies
- uses: alehechka/upload-tartifact@v1
+ uses: ./.github/actions/upload-files
with:
name: ${{ matrix.tag }}-deps
path: ${{runner.temp}}/bun-deps
diff --git a/.github/workflows/bun-mac-x64-baseline.yml b/.github/workflows/bun-mac-x64-baseline.yml
index 633419e84..90cf1ea36 100644
--- a/.github/workflows/bun-mac-x64-baseline.yml
+++ b/.github/workflows/bun-mac-x64-baseline.yml
@@ -193,13 +193,13 @@ jobs:
make -j $(sysctl -n hw.ncpu) release-bindings
- name: Upload C++
if: matrix.compile_obj
- uses: alehechka/upload-tartifact@v1
+ uses: ./.github/actions/upload-files
with:
name: ${{ matrix.tag }}-cpp
path: ${{ runner.temp }}/bun-cpp-obj
- name: Upload Dependencies
if: matrix.dependencies
- uses: alehechka/upload-tartifact@v1
+ uses: ./.github/actions/upload-files
with:
name: ${{ matrix.tag }}-deps
path: ${{runner.temp}}/bun-deps
diff --git a/.github/workflows/bun-mac-x64.yml b/.github/workflows/bun-mac-x64.yml
index f587446b6..253d63e76 100644
--- a/.github/workflows/bun-mac-x64.yml
+++ b/.github/workflows/bun-mac-x64.yml
@@ -194,13 +194,13 @@ jobs:
make -j $(sysctl -n hw.ncpu) release-bindings
- name: Upload C++
if: matrix.compile_obj
- uses: alehechka/upload-tartifact@v1
+ uses: ./.github/actions/upload-files
with:
name: ${{ matrix.tag }}-cpp
path: ${{ runner.temp }}/bun-cpp-obj
- name: Upload Dependencies
if: matrix.dependencies
- uses: alehechka/upload-tartifact@v1
+ uses: ./.github/actions/upload-files
with:
name: ${{ matrix.tag }}-deps
path: ${{runner.temp}}/bun-deps