|
20 | 20 | required: false |
21 | 21 | type: string |
22 | 22 | default: ${{ github.event.workflow_call.head.ref }} |
| 23 | + artifact-id: |
| 24 | + description: The artifact id to use for the build artifacts |
| 25 | + required: false |
| 26 | + type: string |
23 | 27 | outputs: |
24 | 28 | has-changed: |
25 | 29 | value: ${{ jobs.compare.outputs.has-changed }} |
@@ -74,13 +78,13 @@ jobs: |
74 | 78 | run: yarn install --frozen-lockfile --cache-folder .cache/yarn |
75 | 79 |
|
76 | 80 | - name: Download build artifacts for head |
77 | | - uses: actions/download-artifact@v3 |
| 81 | + uses: actions/download-artifact@v4 |
78 | 82 | with: |
79 | 83 | name: ubuntu-latest-node18-compiled-assets-${{ inputs.head-sha }} |
80 | 84 | path: ${{ github.workspace }}/${{ inputs.head-sha }} |
81 | 85 |
|
82 | 86 | - name: Download build artifacts for base |
83 | | - uses: actions/download-artifact@v3 |
| 87 | + uses: actions/download-artifact@v4 |
84 | 88 | with: |
85 | 89 | name: ubuntu-latest-node18-compiled-assets-${{ inputs.base-sha }} |
86 | 90 | path: ${{ github.workspace }}/${{ inputs.base-sha }} |
@@ -115,7 +119,7 @@ jobs: |
115 | 119 | echo "key=ubuntu-latest-node18-compiled-assets-${{ matrix.branch }}" >> "$GITHUB_OUTPUT" |
116 | 120 |
|
117 | 121 | - name: Check if build artifacts already exist |
118 | | - uses: actions/download-artifact@v3 |
| 122 | + uses: actions/download-artifact@v4 |
119 | 123 | id: artifact-found |
120 | 124 | continue-on-error: true |
121 | 125 | with: |
@@ -158,25 +162,26 @@ jobs: |
158 | 162 | run: yarn install --frozen-lockfile --cache-folder .cache/yarn |
159 | 163 |
|
160 | 164 | ## --- BUILD --- ## |
161 | | - - name: Check for cached build assets |
| 165 | + - name: Check for built assets |
162 | 166 | continue-on-error: true |
163 | | - id: cache-build |
164 | | - uses: actions/cache@v3 |
| 167 | + id: download |
| 168 | + uses: actions/download-artifact@v4 |
165 | 169 | with: |
166 | 170 | path: | |
167 | | - components/*/dist/** |
168 | | - tokens/dist/** |
169 | | - ui-icons/dist/** |
170 | | - key: ${{ steps.derive-key.outputs.key }} |
| 171 | + ${{ github.workspace }}/components/*/dist/** |
| 172 | + ${{ github.workspace }}/tokens/dist/** |
| 173 | + ${{ github.workspace }}/ui-icons/dist/** |
| 174 | + name: ${{ steps.derive-key.outputs.key }} |
171 | 175 |
|
172 | 176 | - name: Build |
173 | | - if: ${{ steps.cache-build.outputs.cache-hit != 'true' }} |
| 177 | + if: ${{ steps.download.outcome != 'success' }} |
174 | 178 | shell: bash |
175 | 179 | run: yarn build |
176 | 180 |
|
177 | 181 | - name: Upload compiled assets |
| 182 | + if: ${{ steps.download.outcome != 'success' }} |
178 | 183 | id: upload |
179 | | - uses: actions/upload-artifact@v3 |
| 184 | + uses: actions/upload-artifact@v4 |
180 | 185 | with: |
181 | 186 | path: | |
182 | 187 | ${{ github.workspace }}/components/*/dist/** |
|
0 commit comments