File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -28,18 +28,23 @@ jobs:
2828 env :
2929 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3030
31- - name : Extract new URLs from diff
31+ - name : Extract new URLs from diff and archive
3232 id : url-check
3333 run : |
34- # Get diff and extract new URLs using regex
35- git diff ${{ steps.last-run.outputs.sha }} -- _data/conferences.yml | \
36- grep -E '^\+.*https?://[^ ]+' | \
37- sed -E 's/^\+[[:space:]]*[^:]*:[[:space:]]*(https?:\/\/[^ ]+).*/\1/' > new_urls.txt
34+ # Extract URLs and set up multiline output
35+ URLS=$( git diff ${{ steps.last-run.outputs.sha }} -- _data/conferences.yml | \
36+ grep -E '^\+.*https?://[^ ]+' | \
37+ sed -E 's/^\+[[:space:]]*[^:]*:[[:space:]]*(https?:\/\/[^ ]+).*/\1/')
3838
39- if [ -s new_urls.txt ]; then
39+ if [ -n "$URLS" ]; then
4040 echo "has_new_urls=true" >> $GITHUB_OUTPUT
41+ {
42+ echo "urls<<EOF"
43+ echo "$URLS"
44+ echo "EOF"
45+ } >> $GITHUB_OUTPUT
4146 echo "Found new URLs:"
42- cat new_urls.txt
47+ echo "$URLS"
4348 else
4449 echo "has_new_urls=false" >> $GITHUB_OUTPUT
4550 echo "No new URLs found"
4954 if : steps.url-check.outputs.has_new_urls == 'true'
5055 uses :
JamieMagee/[email protected] 5156 with :
52- url : |-
53- $(cat new_urls.txt)
57+ url : ${{ steps.url-check.outputs.urls }}
You can’t perform that action at this time.
0 commit comments