From 22cadcc884448cdc388da339f84fcebde6627336 Mon Sep 17 00:00:00 2001 From: joyqi Date: Fri, 20 Aug 2021 01:08:37 +0800 Subject: [PATCH] add trigger --- .github/workflows/Typecho-dev-Ci.yml | 7 +++++-- var/Typecho/Widget.php | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Typecho-dev-Ci.yml b/.github/workflows/Typecho-dev-Ci.yml index 072df14f..229a057c 100644 --- a/.github/workflows/Typecho-dev-Ci.yml +++ b/.github/workflows/Typecho-dev-Ci.yml @@ -47,5 +47,8 @@ jobs: - name: Upload a Build Artifact uses: actions/upload-artifact@v2 with: - name: typecho - path: ./build/ + name: typecho + path: ./build/ + - name: Trigger build + run: | + curl -XPOST -u "${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/typecho/languages/actions/workflows/update.yml/dispatches --data '{"ref": "master"}' diff --git a/var/Typecho/Widget.php b/var/Typecho/Widget.php index c123b076..35011d31 100644 --- a/var/Typecho/Widget.php +++ b/var/Typecho/Widget.php @@ -408,6 +408,22 @@ abstract class Typecho_Widget $this->row[$name] = $value; } + /** + * @return int + */ + public function getSequence(): int + { + return $this->sequence; + } + + /** + * @return int + */ + public function getLength(): int + { + return $this->length; + } + /** * 验证堆栈值是否存在 *