Skip to content

Commit c5fe723

Browse files
committed
fix: upload to correct tag directory on build
1 parent fbba2bd commit c5fe723

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ jobs:
228228

229229
build-plugin:
230230
needs: [build-api, build-web, build-unraid-ui-webcomponents]
231+
outputs:
232+
tag: ${{ steps.build-plugin.outputs.tag }}
231233
defaults:
232234
run:
233235
working-directory: plugin
@@ -262,12 +264,15 @@ jobs:
262264
name: unraid-api
263265
path: /tmp/unraid-api/
264266
- name: Extract Unraid API and Build Plugin
267+
id: build-plugin
265268
run: |
266269
tar -xzf /tmp/unraid-api/unraid-api.tgz -C ${{ github.workspace }}/plugin/source/dynamix.unraid.net/usr/local/unraid-api
267270
cd ${{ github.workspace }}/plugin
268271
269272
if [ -n "${{ github.event.pull_request.number }}" ]; then
270273
export TAG=PR${{ github.event.pull_request.number }}
274+
# Put tag into github env
275+
echo "TAG=${TAG}" >> $GITHUB_OUTPUT
271276
fi
272277
273278
npm run build
@@ -312,7 +317,7 @@ jobs:
312317
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}
313318
AWS_REGION: "auto"
314319
SOURCE_DIR: pr-release
315-
DEST_DIR: unraid-api/pr/${{ github.event.pull_request.number }}
320+
DEST_DIR: unraid-api/tag/${{ needs.build-plugin.outputs.tag }}
316321
- name: Comment URL
317322
uses: thollander/actions-comment-pull-request@v3
318323
with:
@@ -322,7 +327,7 @@ jobs:
322327
This plugin has been deployed to Cloudflare R2 and is available for testing.
323328
Download it at this URL:
324329
```
325-
https://preview.dl.unraid.net/unraid-api/pr/${{ github.event.pull_request.number }}/dynamix.unraid.net.plg
330+
https://preview.dl.unraid.net/unraid-api/tag/${{ needs.build-plugin.outputs.tag }}/dynamix.unraid.net.plg
326331
```
327332
328333
release-staging:

0 commit comments

Comments
 (0)