Skip to content

Commit ed06cf3

Browse files
authored
Support Artifacts API v4 (#40)
## what * Support Artifacts API v4
1 parent e67570a commit ed06cf3

File tree

4,724 files changed

+1603402
-4320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,724 files changed

+1603402
-4320
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Major Release Tagger
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: cloudposse/github-action-major-release-tagger@v1

.github/workflows/test-negative.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
continue-on-error: true
3232
needs: [setup]
3333
steps:
34-
- uses: actions/download-artifact@v3
34+
- uses: actions/download-artifact@v4
3535

3636
- id: current
3737
run: |-

.github/workflows/test-positive.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
continue-on-error: true
4545
needs: [setup]
4646
steps:
47-
- uses: actions/download-artifact@v3
47+
- uses: actions/download-artifact@v4
4848

4949
- id: current
5050
run: |-

.github/workflows/test-reusable-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
continue-on-error: true
2323
needs: [setup]
2424
steps:
25-
- uses: actions/download-artifact@v3
25+
- uses: actions/download-artifact@v4
2626

2727
- id: current
2828
run: |-

.github/workflows/test-special-chars.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ jobs:
8787
continue-on-error: true
8888
needs: [setup]
8989
steps:
90-
- uses: actions/download-artifact@v3
90+
- uses: actions/download-artifact@v4
9191

9292
- id: current
9393
run: |-
94+
ls -la ./
9495
echo "result=$(ls | wc -l)" >> $GITHUB_OUTPUT
9596
9697
outputs:

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,22 @@ We implement the workaround with two GitHub Actions:
6868
* [Matrix Outputs Write](https://github.com/cloudposse/github-action-matrix-outputs-write)
6969
* [Matrix Outputs Read](https://github.com/cloudposse/github-action-matrix-outputs-read)
7070

71+
## v1 - What's new
72+
73+
> [!IMPORTANT]
74+
> cloudposse/github-action-matrix-outputs-write@v1+ is not currently supported on GHES yet. If you are on GHES, you
75+
> must use [v0](https://github.com/cloudposse/github-action-matrix-outputs-write/releases/tag/0.5.0).
76+
77+
The release of `cloudposse/github-action-matrix-outputs-write@v1` and `cloudposse/github-action-matrix-outputs-read@v1`
78+
are major changes to the backend architecture of Artifacts. They have numerous performance and behavioral improvements.
79+
80+
For more information, see the [`@actions/artifact`](https://github.com/actions/toolkit/tree/main/packages/artifact) documentation.
81+
82+
### Breaking Changes
83+
84+
1. On self hosted runners, additional [firewall rules](https://github.com/actions/toolkit/tree/main/packages/artifact#breaking-changes) may be required.
85+
2. Outputs writen with `cloudposse/github-action-matrix-outputs-write@v1` can not be read by `cloudposse/github-action-matrix-outputs-read@v0`and below versions.
86+
7187

7288

7389

@@ -106,7 +122,7 @@ Example how you can use workaround to reference matrix job outputs.
106122
PLATFORM=${{ matrix.platform }}
107123
108124
## Write for matrix outputs workaround
109-
- uses: cloudposse/github-action-matrix-outputs-write@main
125+
- uses: cloudposse/github-action-matrix-outputs-write@v1
110126
id: out
111127
with:
112128
matrix-step-name: ${{ github.job }}
@@ -121,7 +137,7 @@ Example how you can use workaround to reference matrix job outputs.
121137
runs-on: ubuntu-latest
122138
needs: [build]
123139
steps:
124-
- uses: cloudposse/github-action-matrix-outputs-read@main
140+
- uses: cloudposse/github-action-matrix-outputs-read@v1
125141
id: read
126142
with:
127143
matrix-step-name: build
@@ -205,7 +221,7 @@ jobs:
205221
needs: [build]
206222
steps:
207223
## Write for matrix outputs workaround
208-
- uses: cloudposse/github-action-matrix-outputs-write@main
224+
- uses: cloudposse/github-action-matrix-outputs-write@v1
209225
id: out
210226
with:
211227
matrix-step-name: ${{ inputs.matrix-step-name }}
@@ -246,7 +262,7 @@ jobs:
246262
runs-on: ubuntu-latest
247263
needs: [build]
248264
steps:
249-
- uses: cloudposse/github-action-matrix-outputs-read@main
265+
- uses: cloudposse/github-action-matrix-outputs-read@v1
250266
id: read
251267
with:
252268
matrix-step-name: build
@@ -421,7 +437,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
421437

422438
## Copyright
423439

424-
Copyright © 2017-2023 [Cloud Posse, LLC](https://cpco.io/copyright)
440+
Copyright © 2017-2024 [Cloud Posse, LLC](https://cpco.io/copyright)
425441

426442

427443

README.yaml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,22 @@ introduction: |-
4747
We implement the workaround with two GitHub Actions:
4848
* [Matrix Outputs Write](https://github.com/cloudposse/github-action-matrix-outputs-write)
4949
* [Matrix Outputs Read](https://github.com/cloudposse/github-action-matrix-outputs-read)
50+
51+
## v1 - What's new
52+
53+
> [!IMPORTANT]
54+
> cloudposse/github-action-matrix-outputs-write@v1+ is not currently supported on GHES yet. If you are on GHES, you
55+
> must use [v0](https://github.com/cloudposse/github-action-matrix-outputs-write/releases/tag/0.5.0).
56+
57+
The release of `cloudposse/github-action-matrix-outputs-write@v1` and `cloudposse/github-action-matrix-outputs-read@v1`
58+
are major changes to the backend architecture of Artifacts. They have numerous performance and behavioral improvements.
59+
60+
For more information, see the [`@actions/artifact`](https://github.com/actions/toolkit/tree/main/packages/artifact) documentation.
61+
62+
### Breaking Changes
63+
64+
1. On self hosted runners, additional [firewall rules](https://github.com/actions/toolkit/tree/main/packages/artifact#breaking-changes) may be required.
65+
2. Outputs writen with `cloudposse/github-action-matrix-outputs-write@v1` can not be read by `cloudposse/github-action-matrix-outputs-read@v0`and below versions.
5066
5167
references:
5268
- name: "github-actions-workflows"
@@ -88,7 +104,7 @@ usage: |-
88104
PLATFORM=${{ matrix.platform }}
89105
90106
## Write for matrix outputs workaround
91-
- uses: cloudposse/github-action-matrix-outputs-write@main
107+
- uses: cloudposse/github-action-matrix-outputs-write@v1
92108
id: out
93109
with:
94110
matrix-step-name: ${{ github.job }}
@@ -103,7 +119,7 @@ usage: |-
103119
runs-on: ubuntu-latest
104120
needs: [build]
105121
steps:
106-
- uses: cloudposse/github-action-matrix-outputs-read@main
122+
- uses: cloudposse/github-action-matrix-outputs-read@v1
107123
id: read
108124
with:
109125
matrix-step-name: build
@@ -187,7 +203,7 @@ usage: |-
187203
needs: [build]
188204
steps:
189205
## Write for matrix outputs workaround
190-
- uses: cloudposse/github-action-matrix-outputs-write@main
206+
- uses: cloudposse/github-action-matrix-outputs-write@v1
191207
id: out
192208
with:
193209
matrix-step-name: ${{ inputs.matrix-step-name }}
@@ -228,7 +244,7 @@ usage: |-
228244
runs-on: ubuntu-latest
229245
needs: [build]
230246
steps:
231-
- uses: cloudposse/github-action-matrix-outputs-read@main
247+
- uses: cloudposse/github-action-matrix-outputs-read@v1
232248
id: read
233249
with:
234250
matrix-step-name: build

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const core = require('@actions/core');
22
const yaml = require('yaml')
3-
const artifact = require('@actions/artifact');
3+
const {DefaultArtifactClient} = require('@actions/artifact')
44
const crypto = require('crypto');
55
const fs = require('fs');
66

@@ -73,7 +73,7 @@ ${error}`;
7373

7474
const hex = hashSum.digest('hex');
7575

76-
const artifactClient = artifact.create()
76+
const artifactClient = new DefaultArtifactClient();
7777
const artifactName = hex;
7878
const files = [
7979
"./" + step_name,
@@ -84,7 +84,7 @@ ${error}`;
8484
continueOnError: false
8585
}
8686

87-
const uploadResponse = artifactClient.uploadArtifact(artifactName, files, rootDirectory, options)
87+
artifactClient.uploadArtifact(artifactName, files, rootDirectory, options)
8888
}
8989
} catch (error) {
9090
core.setFailed(error.message);

node_modules/.bin/crc32

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/dot-object

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)