mirror of
https://github.com/unraid/api.git
synced 2026-01-13 20:19:56 -06:00
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [node](https://redirect.github.com/actions/node-versions) | uses-with | major | `20.x` -> `22.x` | --- ### Release Notes <details> <summary>actions/node-versions (node)</summary> ### [`v22.14.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.14.0-13265982013): 22.14.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.13.1-12900459766...22.14.0-13265982013) Node.js 22.14.0 ### [`v22.13.1`](https://redirect.github.com/actions/node-versions/releases/tag/22.13.1-12900459766): 22.13.1 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.13.0-12671059536...22.13.1-12900459766) Node.js 22.13.1 ### [`v22.13.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.13.0-12671059536): 22.13.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.12.0-12152383658...22.13.0-12671059536) Node.js 22.13.0 ### [`v22.12.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.12.0-12152383658): 22.12.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.11.0-11593095476...22.12.0-12152383658) Node.js 22.12.0 ### [`v22.11.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.11.0-11593095476): 22.11.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.10.0-11377615849...22.11.0-11593095476) Node.js 22.11.0 ### [`v22.10.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.10.0-11377615849): 22.10.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.9.0-10914884886...22.10.0-11377615849) Node.js 22.10.0 ### [`v22.9.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.9.0-10914884886): 22.9.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.8.0-10685632420...22.9.0-10914884886) Node.js 22.9.0 ### [`v22.8.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.8.0-10685632420): 22.8.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.7.0-10511334152...22.8.0-10685632420) Node.js 22.8.0 ### [`v22.7.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.7.0-10511334152): 22.7.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.6.0-10277432289...22.7.0-10511334152) Node.js 22.7.0 ### [`v22.6.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.6.0-10277432289): 22.6.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.5.1-10010673511...22.6.0-10277432289) Node.js 22.6.0 ### [`v22.5.1`](https://redirect.github.com/actions/node-versions/releases/tag/22.5.1-10010673511): 22.5.1 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.5.0-9985144103...22.5.1-10010673511) Node.js 22.5.1 ### [`v22.5.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.5.0-9985144103): 22.5.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.4.1-9860948056...22.5.0-9985144103) Node.js 22.5.0 ### [`v22.4.1`](https://redirect.github.com/actions/node-versions/releases/tag/22.4.1-9860948056): 22.4.1 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.4.0-9766506602...22.4.1-9860948056) Node.js 22.4.1 ### [`v22.4.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.4.0-9766506602): 22.4.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.3.0-9569309553...22.4.0-9766506602) Node.js 22.4.0 ### [`v22.3.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.3.0-9569309553): 22.3.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.2.0-9105861751...22.3.0-9569309553) Node.js 22.3.0 ### [`v22.2.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.2.0-9105861751): 22.2.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.1.0-8926142033...22.2.0-9105861751) Node.js 22.2.0 ### [`v22.1.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.1.0-8926142033): 22.1.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/22.0.0-8879734543...22.1.0-8926142033) Node.js 22.1.0 ### [`v22.0.0`](https://redirect.github.com/actions/node-versions/releases/tag/22.0.0-8879734543): 22.0.0 [Compare Source](https://redirect.github.com/actions/node-versions/compare/20.19.0-13838090974...22.0.0-8879734543) Node.js 22.0.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/unraid/api). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
112 lines
3.7 KiB
YAML
112 lines
3.7 KiB
YAML
name: Publish Release to Digital Ocean
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Tag to update'
|
|
required: true
|
|
|
|
|
|
jobs:
|
|
publish-to-digital-ocean:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Download Release Artifacts (Plugins)
|
|
uses: dsaltares/fetch-gh-release-asset@master
|
|
with:
|
|
file: ".*"
|
|
regex: true
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
target: "./"
|
|
version: ${{ inputs.version && format('tags/{0}', inputs.version) || 'latest' }}
|
|
|
|
- uses: cardinalby/git-get-release-action@v1
|
|
id: release-info
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
latest: true
|
|
prerelease: false
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22.x'
|
|
- run: npm install html-escaper@2 xml2js
|
|
- name: Update Plugin Changelog
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
const fs = require('fs');
|
|
const { escape } = require('html-escaper');
|
|
const releaseNotes = escape(`${{ steps.release-info.outputs.body }}`);
|
|
|
|
if (!releaseNotes) {
|
|
console.error('No release notes found');
|
|
process.exit(1);
|
|
}
|
|
|
|
// Read the plugin file
|
|
const pluginPath = 'dynamix.unraid.net.plg';
|
|
|
|
if (!fs.existsSync(pluginPath)) {
|
|
console.error('Plugin file not found:', pluginPath);
|
|
process.exit(1);
|
|
}
|
|
|
|
let pluginContent = fs.readFileSync(pluginPath, 'utf8');
|
|
|
|
// Replace the changelog section using CDATA
|
|
pluginContent = pluginContent.replace(
|
|
/<CHANGES>[\s\S]*?<\/CHANGES>/,
|
|
`<CHANGES>\n${releaseNotes}\n</CHANGES>`
|
|
);
|
|
|
|
// Validate the plugin file is valid XML
|
|
const xml2js = require('xml2js');
|
|
const parser = new xml2js.Parser({
|
|
explicitCharkey: true,
|
|
trim: true,
|
|
explicitRoot: true,
|
|
explicitArray: false,
|
|
attrkey: 'ATTR',
|
|
charkey: 'TEXT',
|
|
xmlnskey: 'XMLNS',
|
|
normalizeTags: false,
|
|
normalize: false,
|
|
strict: false // Try with less strict parsing
|
|
});
|
|
parser.parseStringPromise(pluginContent).then((result) => {
|
|
if (!result) {
|
|
console.error('Plugin file is not valid XML');
|
|
process.exit(1);
|
|
}
|
|
console.log('Plugin file is valid XML');
|
|
|
|
// Write back to file
|
|
fs.writeFileSync(pluginPath, pluginContent);
|
|
}).catch((err) => {
|
|
console.error('Plugin file is not valid XML', err);
|
|
process.exit(1);
|
|
});
|
|
|
|
- name: Upload Release Files to DO Spaces
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.DO_ACCESS_KEY }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.DO_SECRET_KEY }}
|
|
AWS_DEFAULT_REGION: ${{ secrets.DO_SPACE_REGION }}
|
|
AWS_ENDPOINT_URL: https://${{ secrets.DO_SPACE_REGION }}.digitaloceanspaces.com
|
|
run: |
|
|
aws s3 sync . s3://${{ secrets.DO_SPACE_NAME }}/unraid-api --checksum-algorithm CRC32
|
|
|
|
- name: Upload Release Files to Cloudflare Bucket
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.CF_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}
|
|
AWS_DEFAULT_REGION: auto
|
|
AWS_ENDPOINT_URL: ${{ secrets.CF_ENDPOINT }}
|
|
run: |
|
|
aws s3 sync . s3://${{ secrets.CF_BUCKET }}/unraid-api --checksum-algorithm CRC32
|