From b64551718c3b7ae3776e156943f228e80f57c1c9 Mon Sep 17 00:00:00 2001
From: suda-morris <362953310@qq.com>
Date: Mon, 12 Aug 2019 19:45:48 +0800
Subject: [PATCH] gh_action: converted main.workflow to Actions V2 yml files

---
 .github/main.workflow               | 22 ----------------------
 .github/workflows/issue_comment.yml | 16 ++++++++++++++++
 .github/workflows/issues.yml        | 16 ++++++++++++++++
 .github/workflows/pull_request.yml  | 16 ++++++++++++++++
 4 files changed, 48 insertions(+), 22 deletions(-)
 delete mode 100644 .github/main.workflow
 create mode 100644 .github/workflows/issue_comment.yml
 create mode 100644 .github/workflows/issues.yml
 create mode 100644 .github/workflows/pull_request.yml

diff --git a/.github/main.workflow b/.github/main.workflow
deleted file mode 100644
index d23b686c5c..0000000000
--- a/.github/main.workflow
+++ /dev/null
@@ -1,22 +0,0 @@
-workflow "Sync issues to JIRA" {
-  on = "issues"
-  resolves = ["Sync to JIRA"]
-}
-
-workflow "Sync issue and PR comments to JIRA" {
-  on = "issue_comment"
-  resolves = ["Sync to JIRA"]
-}
-
-workflow "Sync PRs to JIRA" {
-  on = "pull_request"
-  resolves = ["Sync to JIRA"]
-}
-
-action "Sync to JIRA" {
-  uses = "espressif/github-actions/sync_issues_to_jira@master"
-  secrets = ["GITHUB_TOKEN", "JIRA_URL", "JIRA_USER", "JIRA_PASS"]
-  env = {
-    JIRA_PROJECT = "IDFGH"
-  }
-}
diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml
new file mode 100644
index 0000000000..16069f1f13
--- /dev/null
+++ b/.github/workflows/issue_comment.yml
@@ -0,0 +1,16 @@
+on: issue_comment
+name: Sync issue and PR comments to JIRA
+jobs:
+  syncToJIRA:
+    name: Sync to JIRA
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@master
+    - name: Sync to JIRA
+      uses: espressif/github-actions/sync_issues_to_jira@master
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        JIRA_PASS: ${{ secrets.JIRA_PASS }}
+        JIRA_PROJECT: IDFGH
+        JIRA_URL: ${{ secrets.JIRA_URL }}
+        JIRA_USER: ${{ secrets.JIRA_USER }}
diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml
new file mode 100644
index 0000000000..3ead596888
--- /dev/null
+++ b/.github/workflows/issues.yml
@@ -0,0 +1,16 @@
+on: issues
+name: Sync issues to JIRA
+jobs:
+  syncToJIRA:
+    name: Sync to JIRA
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@master
+    - name: Sync to JIRA
+      uses: espressif/github-actions/sync_issues_to_jira@master
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        JIRA_PASS: ${{ secrets.JIRA_PASS }}
+        JIRA_PROJECT: IDFGH
+        JIRA_URL: ${{ secrets.JIRA_URL }}
+        JIRA_USER: ${{ secrets.JIRA_USER }}
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
new file mode 100644
index 0000000000..324639e08b
--- /dev/null
+++ b/.github/workflows/pull_request.yml
@@ -0,0 +1,16 @@
+on: pull_request
+name: Sync PRs to JIRA
+jobs:
+  syncToJIRA:
+    name: Sync to JIRA
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@master
+    - name: Sync to JIRA
+      uses: espressif/github-actions/sync_issues_to_jira@master
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        JIRA_PASS: ${{ secrets.JIRA_PASS }}
+        JIRA_PROJECT: IDFGH
+        JIRA_URL: ${{ secrets.JIRA_URL }}
+        JIRA_USER: ${{ secrets.JIRA_USER }}