From 4b943da7ed53ee2edcd5a8732d30cbba920a3f00 Mon Sep 17 00:00:00 2001 From: Acid Chicken Date: Tue, 21 May 2024 17:34:49 +0900 Subject: [PATCH] ci: bash compatibility --- .github/workflows/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6e65c82..fafae40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,14 @@ jobs: - uses: Homebrew/actions/setup-homebrew@master - run: | cd misskey - (brew install jaq; cd misskey; jaq --in-place ".version += \"-${${"$(git -P log --color=never --pretty=format:%d.%H | head -n1)":10}/,*)/}\"" package.json) + ( + brew install jaq; + cd misskey; + version=$(git -P log --color=never --pretty=format:%d.%H | head -n1); + version=${version:10}; + version=${version/,*)/}; + jaq --in-place ".version += \"-$version" package.json + ) docker build -t "ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-misskey" . docker push "ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-misskey" env: