-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop support for MySQL 5.7 #84
Conversation
.github/workflows/build.yml
Outdated
tags="${tags},groonga/mroonga:latest" | ||
fi | ||
echo "::set-output name=push::${push}" | ||
echo "::set-output name=tags::${tags}" | ||
- uses: actions/checkout@v4 | ||
- uses: docker/login-action@v3 | ||
if: ${{ steps.parse.outputs.push }} == 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if: ${{ steps.parse.outputs.push }} == 'true' | |
if: steps.parse.outputs.push == 'true' |
tags="${tags},groonga/mroonga:latest" | ||
fi | ||
echo "::set-output name=push::${push}" | ||
echo "::set-output name=tags::${tags}" | ||
- uses: actions/checkout@v4 | ||
- uses: docker/login-action@v3 | ||
if: steps.parse.outputs.push == 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GITHUB_EVENT_NAME
がpush
のときだけsteps.parse.outputs.push
をtrue
にしてくれる?
;; | ||
*) | ||
version=${{ matrix.id }}-latest | ||
push=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これは維持して欲しい。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これをがんばらない方がいいのかな。
たぶん、タグとpushしたコミットの両方でpushするとエラーになるからこうしているんだと思うんだけど、それを無視すればいいっちゃいいんだよね。気持ち悪いけど。
.github/workflows/build.yml
Outdated
case "${{ github.ref }}" in | ||
refs/tags/*) | ||
version=$(echo "${{ github.ref }}" | sed -e "s,^refs/tags/,,g") | ||
version="${{ github.ref_name }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これもやっちゃうならcase "${{ github.ref }}" in
も直しちゃう?
if [ "${GITHUB_REF_TYPE}" = "tag" ] -a [[ "${GITHUB_REF_NAME}" =~ "^${{ matrix.id }}\." ]]; then
version="${GITHUB_REF_NAME}"
else
version=${{ matrix.id }}-latest
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bashで正規表現メモ
パターンを "
で囲むと正規表現として扱われないらしい。
$ bash -c '[[ "hoge.2" =~ ^hoge\. ]] && echo "true"'
true
$ bash -c '[[ "hoge.2" =~ "^hoge\." ]] && echo "true"'
# (出力なし)
.github/workflows/build.yml
Outdated
;; | ||
esac | ||
|
||
push=false | ||
if [[ "${{ github.event_name }}" = "push" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
シェルスクリプトの中では${{ github.XXX }}
より${GITHUB_XXX}
を使って欲しい。評価タイミングが揃うから。
esac | ||
fi | ||
else | ||
version=${{ matrix.id }}-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
タグじゃない"${GITHUB_EVENT_NAME}" = "push"
のときはpush=true
して欲しい。
.github/workflows/build.yml
Outdated
if [ "${GITHUB_EVENT_NAME}" = "push" ] && [ "${GITHUB_REF_TYPE}" != "tag" ]; then | ||
push=true | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これだとmysql-8.0.30-12.06
とかのイメージがpushされなくない?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
タシカニ…。脳みそがおつかれなので、復活してから整理します…。
.github/workflows/build.yml
Outdated
esac | ||
if [ "${GITHUB_EVENT_NAME}" = "push" ]; then | ||
push=true | ||
if [ "${GITHUB_REF_TYPE}" = "tag" ] && [[ !("${GITHUB_REF_NAME}" =~ ^${{ matrix.id }}\.) ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bashで正規表現を何回も使うのはしんどいのでこんなんでいけないかな。
if [ "${GITHUB_REF_TYPE}" = "tag" ] && [[ !("${GITHUB_REF_NAME}" =~ ^${{ matrix.id }}\.) ]]; then | |
if [ "${GITHUB_REF_TYPE}" = "tag" ] && [ "${version}" != "${GITHUB_REF_NAME}” ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
タシカニ。$version
を見る発想はあったんですが、-latest
の有無で判断すべきという思考から抜け出せなかったです…。
We also tidied up the conditions for docker push with CI.