From 0adaed6c97c26529290fdcb83c923a242ed48414 Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Sun, 9 Jul 2023 16:55:41 +0000 Subject: [PATCH] =?UTF-8?q?blog:=20=E4=BD=BF=E7=94=A8=20Github=20Action=20?= =?UTF-8?q?=E4=B8=BA=E5=85=B6=E4=BB=96=E9=A1=B9=E7=9B=AE=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=20Docker=20Image.=20=E6=9B=B4=E6=96=B0=E8=AF=AD=E6=B3=95?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/blog/build-docker-image-for-other-project.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/blog/build-docker-image-for-other-project.md b/data/blog/build-docker-image-for-other-project.md index 43e8e10..bdb477b 100644 --- a/data/blog/build-docker-image-for-other-project.md +++ b/data/blog/build-docker-image-for-other-project.md @@ -79,7 +79,7 @@ on: run: | cd vue-torrent echo "Current commitish: $(git rev-parse HEAD)" - echo "::set-output name=current_commitish::$(git rev-parse HEAD)" + echo "{current_commitish}=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT ``` 这里直接进入子模块的目录里,使用 `git rev-parse HEAD` 命令获取当前 repo 使用的上游的 commit-ish。 @@ -93,7 +93,7 @@ on: id: compare run: | echo "Current version: ${{ steps.git-get-release.outputs.tag_name }}" - echo "::set-output name=should_update::${{ steps.git-get-release.outputs.target_commitish != steps.get-current-commitish.outputs.current_commitish }}" + echo "{should_update}=${{ steps.git-get-release.outputs.target_commitish != steps.get-current-commitish.outputs.current_commitish }}" >> $GITHUB_OUTPUT ``` 下面就是重要的三个步骤了,一更新子模块,二提交更新,三打标签。