jobs:
creat-comment:
run-on: ubuntu-latest
steps:
- name: Create comment
uses: action-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GIHUB_TOKEN }}
issue-number: ${{github.event.issue.number}}
body: |
welcome to the Linkis community!!
jobs:
markdownlint:
name: Markdown
ubuntu-latest :
steps:
uses: actions/[email protected]
uses: actions/[email protected]
with:
14 :
run: npm install -g [email protected]
run: markdownlint '**/*.md' --ignore node_modules
-
Name:定義了工作流的名稱,此處爲持續集成(Continous Integration, CI) -
On:爲觸發工作流的事件,此處定義爲更新推送到main分支時需要執行命令。 -
J obs: 裏定義了工作任務,deploy爲工作的名稱,在GitHub的Ubuntu Linux虛擬機上運行一系列步驟。 -
Uses: 後接GitHub Action集市裏的action。 這裏也使用了action來check out倉庫並將代碼下載到運行代碼的服務器上。
-
name: 自定action的名字 -
description: 對action需要傳入的參數或者輸出進行聲明 -
inputs: 自定需要輸入的參數 -
outputs: 輸出的變量 -
runs: 啓動方式
# github action 的名稱
name: "Auto_close_associate_issue"
# 該action的描述
description: "Auto close an issue which associate with a PR."
#定義需要輸入的參數
inputs:
# 第一個參數名叫prbody
prbody:
#對該參數名的描述
description: "The body of the PR to search for related issues"
# 必須參數
required: true
outputs:
#輸出的參數名
issurNumber:
description: "The issue number"
runs:
# 使用docker鏡像
using: "docker"
"Dockerfile" :
// 獲取環境變量,所有傳給github action的參數一律大寫,且需要加上INPUT_前綴,此處是github規定的
let body = process.env['INPUT_PRBODY'];
// 利用正則表達式抽取出issue編號數字
let pattern = /#\d+/;
let issueNumber = body.match(pattern)[0].replace('#', '');
// 輸出到環境中
console.log(`::set-output name=issueNumber::${issueNumber}`);
[
'@docusaurus/plugin-client-redirects',
{
createRedirects(existingPath) {
if(existingPath.includes('/latest')){
return [existingPath.replace('/latest', '/1.2.0')]
}
return undefined;
}
}
]
如何成爲社區貢獻者
1 ► 官方文檔貢獻。發現文檔的不足、優化文檔,持續更新文檔等方式參與社區貢獻。通過文檔貢獻,讓開發者熟悉如何提交PR和真正參與到社區的建設。參考攻略:保姆級教程:如何成爲Apache Linkis文檔貢獻者
2 ► 代碼貢獻。我們梳理了社區中簡單並且容易入門的的任務,非常適合新人做代碼貢獻。請查閱新手任務列表:https://github.com/apache/incubator-linkis/issues/1161
3 ► 內容貢獻:發佈WeDataSphere開源組件相關的內容,包括但不限於安裝部署教程、使用經驗、案例實踐等,形式不限,請投稿給小助手。例如:
4 ► 社區答疑:積極在社區中進行答疑、分享技術、幫助開發者解決問題等;
5 ► 其他:積極參與社區活動、成爲社區志願者、幫助社區宣傳、爲社區發展提供有效建議等;
本文分享自微信公衆號 - WeDataSphere(gh_273e85fce73b)。
如有侵權,請聯繫 [email protected] 刪除。
本文參與“OSC源創計劃”,歡迎正在閱讀的你也加入,一起分享。