36 lines
860 B
YAML
36 lines
860 B
YAML
name: 'Composite Action Template'
|
|
description: 'Composite Action 範本'
|
|
author: 'Jeffery'
|
|
inputs:
|
|
gitea_token:
|
|
description: 'Gitea Token'
|
|
required: true
|
|
text:
|
|
description: '輸入的文字'
|
|
required: false
|
|
default: 'Hello, World!'
|
|
outputs:
|
|
text:
|
|
description: '輸出的文字'
|
|
value: ${{ steps.change.outputs.text }}
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- name: 交換
|
|
id: change
|
|
env:
|
|
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN || inputs.gitea_token }}
|
|
TEXT: ${{ inputs.text }}
|
|
run: |
|
|
echo "Gitea Server Url: $GITEA_SERVER_URL"
|
|
|
|
echo "Gitea Repository: $GITEA_REPOSITORY"
|
|
|
|
echo "Gitea Token: $GITEA_TOKEN"
|
|
|
|
echo "Text: $TEXT"
|
|
|
|
echo "text=$TEXT" >> "$GITHUB_OUTPUT"
|
|
shell: bash |