File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,6 @@ inputs:
1919 replace_marker :
2020 description : ' Marker in Markdown file to identify where to replace the permalink'
2121 required : true
22- permalink_template :
23- description : ' Template for the permalink'
24- required : true
2522outputs :
2623 permalink :
2724 description : ' The generated permalink'
4643 exit 1
4744 fi
4845
49- REPO=$(echo $GITHUB_REPOSITORY)
50- PERMALINK=$(echo "${{ inputs.permalink_template }}" |
51- sed "s|{{REPO}}|$REPO|g" |
52- sed "s|{{COMMIT_ID}}|${{ steps.get-commit.outputs.commit_id }}|g" |
53- sed "s|{{FILE_PATH}}|${{ inputs.snippet_file }}|g" |
54- sed "s|{{START_LINE}}|$START_LINE|g" |
55- sed "s|{{END_LINE}}|$END_LINE|g")
46+ PERMALINK="https://github.com/${GITHUB_REPOSITORY}/blob/${{ steps.get-commit.outputs.commit_id }}/${{ inputs.snippet_file }}#L${START_LINE}-L${END_LINE}"
5647
5748 echo "permalink=$PERMALINK" >> $GITHUB_OUTPUT
5849
You can’t perform that action at this time.
0 commit comments