mirror of
https://github.com/unraid/api.git
synced 2026-01-04 15:39:52 -06:00
build: fix artifact retreival in plugin promotion workflow (#1458)
Tested via manual dispatch on #1456 via cli. results in: ```xml <!DOCTYPE PLUGIN [ <!ENTITY name "dynamix.unraid.net"> <!ENTITY launch "Connect"> <!ENTITY author "limetech"> <!ENTITY version "2025.07.03.0623"> <!ENTITY plugin_url "https://preview.dl.unraid.net/unraid-api/dynamix.unraid.net.plg"> <!ENTITY source "/boot/config/plugins/dynamix.my.servers/&txz_name;"> <!ENTITY txz_sha256 "2075cdb8206733f7f037fefdb004a2d719498d6d6d7f3872afd0682a40ceff28"> <!ENTITY txz_url "https://preview.dl.unraid.net/unraid-api/tag/PR1456/dynamix.unraid.net-4.8.0-x86_64-24.txz"> <!ENTITY txz_name "dynamix.unraid.net-4.8.0-x86_64-24.txz"> <!ENTITY arch "x86_64"> <!ENTITY build "24"> <!ENTITY tag "PR1456"> <!ENTITY api_version "4.8.0"> ]> ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated workflow input descriptions for consistency. * Expanded job permissions to improve workflow capabilities. * Enhanced artifact download step with additional input options. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
11
.github/workflows/push-staging-pr-on-close.yml
vendored
11
.github/workflows/push-staging-pr-on-close.yml
vendored
@@ -7,11 +7,11 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pr_number:
|
||||
description: 'PR number to test with'
|
||||
description: "PR number to test with"
|
||||
required: true
|
||||
type: string
|
||||
pr_merged:
|
||||
description: 'Simulate merged PR'
|
||||
description: "Simulate merged PR"
|
||||
required: true
|
||||
type: boolean
|
||||
default: true
|
||||
@@ -22,6 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
steps:
|
||||
- name: Set Timezone
|
||||
uses: szenius/set-timezone@v2.0
|
||||
@@ -45,6 +46,8 @@ jobs:
|
||||
path: connect-files
|
||||
pr: ${{ steps.pr_number.outputs.pr_number }}
|
||||
workflow_conclusion: success
|
||||
workflow_search: true
|
||||
search_artifacts: true
|
||||
|
||||
- name: Update Downloaded Staging Plugin to New Date
|
||||
run: |
|
||||
@@ -55,14 +58,14 @@ jobs:
|
||||
ls -la connect-files/
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo "Found plugin file: $plgfile"
|
||||
version=$(date +"%Y.%m.%d.%H%M")
|
||||
sed -i -E "s#(<!ENTITY version \").*(\">)#\1${version}\2#g" "${plgfile}" || exit 1
|
||||
|
||||
# Change the plugin url to point to staging
|
||||
url="https://preview.dl.unraid.net/unraid-api/dynamix.unraid.net.plg"
|
||||
sed -i -E "s#(<!ENTITY pluginURL \").*(\">)#\1${url}\2#g" "${plgfile}" || exit 1
|
||||
sed -i -E "s#(<!ENTITY plugin_url \").*?(\">)#\1${url}\2#g" "${plgfile}" || exit 1
|
||||
cat "${plgfile}"
|
||||
mkdir -p pr-release
|
||||
mv "${plgfile}" pr-release/dynamix.unraid.net.plg
|
||||
|
||||
Reference in New Issue
Block a user