blog: 使用 Github Action 为其他项目构建 Docker Image. 更新语法。
All checks were successful
🚀 Build and deploy by ftp / 🎉 Deploy (push) Successful in 2m27s

This commit is contained in:
Ivan Li 2023-07-09 16:55:41 +00:00
parent ff13b8b2b2
commit 0adaed6c97

View File

@ -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
```
下面就是重要的三个步骤了,一更新子模块,二提交更新,三打标签。