mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
fix: upload to correct tag directory on build
This commit is contained in:
9
.github/workflows/main.yml
vendored
9
.github/workflows/main.yml
vendored
@@ -228,6 +228,8 @@ jobs:
|
|||||||
|
|
||||||
build-plugin:
|
build-plugin:
|
||||||
needs: [build-api, build-web, build-unraid-ui-webcomponents]
|
needs: [build-api, build-web, build-unraid-ui-webcomponents]
|
||||||
|
outputs:
|
||||||
|
tag: ${{ steps.build-plugin.outputs.tag }}
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: plugin
|
working-directory: plugin
|
||||||
@@ -262,12 +264,15 @@ jobs:
|
|||||||
name: unraid-api
|
name: unraid-api
|
||||||
path: /tmp/unraid-api/
|
path: /tmp/unraid-api/
|
||||||
- name: Extract Unraid API and Build Plugin
|
- name: Extract Unraid API and Build Plugin
|
||||||
|
id: build-plugin
|
||||||
run: |
|
run: |
|
||||||
tar -xzf /tmp/unraid-api/unraid-api.tgz -C ${{ github.workspace }}/plugin/source/dynamix.unraid.net/usr/local/unraid-api
|
tar -xzf /tmp/unraid-api/unraid-api.tgz -C ${{ github.workspace }}/plugin/source/dynamix.unraid.net/usr/local/unraid-api
|
||||||
cd ${{ github.workspace }}/plugin
|
cd ${{ github.workspace }}/plugin
|
||||||
|
|
||||||
if [ -n "${{ github.event.pull_request.number }}" ]; then
|
if [ -n "${{ github.event.pull_request.number }}" ]; then
|
||||||
export TAG=PR${{ github.event.pull_request.number }}
|
export TAG=PR${{ github.event.pull_request.number }}
|
||||||
|
# Put tag into github env
|
||||||
|
echo "TAG=${TAG}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
npm run build
|
npm run build
|
||||||
@@ -312,7 +317,7 @@ jobs:
|
|||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}
|
||||||
AWS_REGION: "auto"
|
AWS_REGION: "auto"
|
||||||
SOURCE_DIR: pr-release
|
SOURCE_DIR: pr-release
|
||||||
DEST_DIR: unraid-api/pr/${{ github.event.pull_request.number }}
|
DEST_DIR: unraid-api/tag/${{ needs.build-plugin.outputs.tag }}
|
||||||
- name: Comment URL
|
- name: Comment URL
|
||||||
uses: thollander/actions-comment-pull-request@v3
|
uses: thollander/actions-comment-pull-request@v3
|
||||||
with:
|
with:
|
||||||
@@ -322,7 +327,7 @@ jobs:
|
|||||||
This plugin has been deployed to Cloudflare R2 and is available for testing.
|
This plugin has been deployed to Cloudflare R2 and is available for testing.
|
||||||
Download it at this URL:
|
Download it at this URL:
|
||||||
```
|
```
|
||||||
https://preview.dl.unraid.net/unraid-api/pr/${{ github.event.pull_request.number }}/dynamix.unraid.net.plg
|
https://preview.dl.unraid.net/unraid-api/tag/${{ needs.build-plugin.outputs.tag }}/dynamix.unraid.net.plg
|
||||||
```
|
```
|
||||||
|
|
||||||
release-staging:
|
release-staging:
|
||||||
|
|||||||
Reference in New Issue
Block a user