@@ -44,18 +44,19 @@ jobs:
44
44
fetch-depth : 0
45
45
path : ${{ github.event.repository.name }}
46
46
47
- # Checkout the required scripts from kodi-pvr/pvr -scripts into the 'scripts' directory
47
+ # Checkout the required scripts from xbmc/binary-addon -scripts into the 'scripts' directory
48
48
- name : Checkout Scripts
49
49
uses : actions/checkout@v4
50
50
with :
51
51
fetch-depth : 0
52
- repository : kodi-pvr/pvr -scripts
52
+ repository : xbmc/binary-addon -scripts
53
53
path : scripts
54
54
55
55
# Install all dependencies required by the following steps
56
56
# - libxml2-utils, xmlstarlet: reading news and version from addon.xml.in
57
57
- name : Install dependencies
58
58
run : |
59
+ sudo apt-get update
59
60
sudo apt-get install libxml2-utils xmlstarlet
60
61
61
62
# Setup python version 3.9
84
85
# - steps.required-variables.outputs.version: version element from addon.xml.in
85
86
# - steps.required-variables.outputs.branch: branch of the triggering ref
86
87
# - steps.required-variables.outputs.today: today's date in format '%Y-%m-%d'
88
+ # Note: we use a random EOF for 'changes' as is best practice for for multiline variables
87
89
- name : Get required variables
88
90
id : required-variables
89
91
run : |
@@ -92,12 +94,10 @@ jobs:
92
94
then
93
95
changes=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/extension/news)' | awk -v RS= 'NR==1')
94
96
fi
95
- changes="${changes//'%'/'%25'}"
96
- changes="${changes//$'\n'/'%0A'}"
97
- changes="${changes//$'\r'/'%0D'}"
98
- changes="${changes//$'\\n'/'%0A'}"
99
- changes="${changes//$'\\r'/'%0D'}"
100
- echo "changes=$changes" >> $GITHUB_OUTPUT
97
+ EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
98
+ echo "changes<<$EOF" >> $GITHUB_OUTPUT
99
+ echo "$changes" >> $GITHUB_OUTPUT
100
+ echo "$EOF" >> $GITHUB_OUTPUT
101
101
version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)')
102
102
echo "version=$version" >> $GITHUB_OUTPUT
103
103
branch=$(echo ${GITHUB_REF#refs/heads/})
0 commit comments