From ab5996e6b3e341c826acc984d2c32d40f6f6fd67 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 21:29:28 +0000 Subject: [PATCH 1/4] chore(deps): update ghcr.io/astral-sh/uv docker tag to v0.6.2 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c9b2e0c432..48185f21ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/astral-sh/uv:0.6.1-python3.13-bookworm-slim@sha256:1658218645a620230c3121cfabb3546adc5085408f6eb152dea615af5dc2710f AS base +FROM ghcr.io/astral-sh/uv:0.6.2-python3.13-bookworm-slim@sha256:25cfd9fb115d7c3b8a20b9df985a4c082abac1364f84ee94abe451b008e48625 AS base # バージョン情報に表示する commit hash を埋め込む FROM base AS commit-hash From dc04abd160487f8a5b3817ec7a458532f9071563 Mon Sep 17 00:00:00 2001 From: Masaya Suzuki Date: Thu, 20 Feb 2025 07:32:58 +0900 Subject: [PATCH 2/4] =?UTF-8?q?Dockerfile=E3=81=8B=E3=82=89uv=E3=81=AE?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92=E8=AA=AD?= =?UTF-8?q?=E3=81=BF=E5=8F=96=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-hato-bot.yml | 22 +++++++++++++++++++ .../update_uv_version/get_uv_version.sh | 4 ++++ .../get_python_version.sh | 3 --- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100755 scripts/deploy_hato_bot/update_uv_version/get_uv_version.sh diff --git a/.github/workflows/deploy-hato-bot.yml b/.github/workflows/deploy-hato-bot.yml index 024dcee548..e7a4809246 100644 --- a/.github/workflows/deploy-hato-bot.yml +++ b/.github/workflows/deploy-hato-bot.yml @@ -15,6 +15,27 @@ on: - master - develop jobs: + update-uv-version: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + if: github.event_name != 'pull_request' || github.event.action != 'closed' + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + - name: Get uv version + if: github.event_name != 'pull_request' || github.event.action != 'closed' + run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/update_version_uv_version/get_uv_version.sh" + env: + HEAD_REF: ${{github.head_ref || github.event.release.tag_name}} + - uses: dev-hato/actions-diff-pr-management@cea263ca46759ebc8c812b8595be4df129761037 # v2.1.0 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + branch-name-prefix: fix-uv-version + pr-title-prefix: uvのバージョンを直してあげたよ! deploy_docker_image: runs-on: ubuntu-latest env: @@ -25,6 +46,7 @@ jobs: contents: read packages: write if: github.event_name == 'release' || (github.event_name == 'pull_request' && github.event.action != 'closed' && github.repository == github.event.pull_request.head.repo.full_name) + needs: update-uv-version steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: diff --git a/scripts/deploy_hato_bot/update_uv_version/get_uv_version.sh b/scripts/deploy_hato_bot/update_uv_version/get_uv_version.sh new file mode 100755 index 0000000000..474033f478 --- /dev/null +++ b/scripts/deploy_hato_bot/update_uv_version/get_uv_version.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +uv_version=$(grep ghcr.io/astral-sh/uv: Dockerfile | sed -e 's!FROM ghcr.io/astral-sh/uv:\([0-9.]*\)-.*!\1!g') +sed -i -e "s/required-version = .*/required-version = \"$uv_version\"/g" pyproject.toml diff --git a/scripts/deploy_hato_bot/update_version_python_version/get_python_version.sh b/scripts/deploy_hato_bot/update_version_python_version/get_python_version.sh index f6cc1084ad..5bc4d1c774 100755 --- a/scripts/deploy_hato_bot/update_version_python_version/get_python_version.sh +++ b/scripts/deploy_hato_bot/update_version_python_version/get_python_version.sh @@ -7,6 +7,3 @@ DOCKER_CMD="python --version 2>&1 | sed -e 's/^Python //g'" python_version=$(docker compose run hato-bot sh -c "${DOCKER_CMD}") echo "Python version:" "${python_version}" sed -i -e "s/requires-python = \"==.*\"/requires-python = \"==${python_version}\"/g" pyproject.toml -DOCKER_CMD="uv version | sed -e 's/uv \([0-9.]*\)/\1/g'" -uv_version=$(docker compose run hato-bot sh -c "${DOCKER_CMD}") -sed -i -e "s/required-version = .*/required-version = \"$uv_version\"/g" pyproject.toml From b86fa440c5f484d3954b49fb2d997ef9e8d73823 Mon Sep 17 00:00:00 2001 From: Masaya Suzuki Date: Thu, 20 Feb 2025 07:34:15 +0900 Subject: [PATCH 3/4] Fix path --- .github/workflows/deploy-hato-bot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-hato-bot.yml b/.github/workflows/deploy-hato-bot.yml index e7a4809246..664527ecf5 100644 --- a/.github/workflows/deploy-hato-bot.yml +++ b/.github/workflows/deploy-hato-bot.yml @@ -28,7 +28,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - name: Get uv version if: github.event_name != 'pull_request' || github.event.action != 'closed' - run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/update_version_uv_version/get_uv_version.sh" + run: bash "${GITHUB_WORKSPACE}/scripts/deploy_hato_bot/update_uv_version/get_uv_version.sh" env: HEAD_REF: ${{github.head_ref || github.event.release.tag_name}} - uses: dev-hato/actions-diff-pr-management@cea263ca46759ebc8c812b8595be4df129761037 # v2.1.0 From 07fdbf62107ac58a83e116ce347a6e8efe7b8f55 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 22:34:33 +0000 Subject: [PATCH 4/4] =?UTF-8?q?uv=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=82=92=E7=9B=B4=E3=81=97=E3=81=A6=E3=81=82?= =?UTF-8?q?=E3=81=92=E3=81=9F=E3=82=88=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 29554670a3..a881fc570f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ dependencies = [ "python-dotenv==1.0.1", "requests==2.32.3", "Pillow>=7.1.2", "o dev = [ "autopep8==2.3.2", "requests-mock==1.12.1", "pylint==3.3.4", "sqlfluff==3.3.1", "mypy==1.15.0", "flake8==7.1.2", "isort==6.0.0", "pre-commit==4.1.0", "importlib-metadata==8.6.1", "toml==0.10.2", "types-toml==0.10.8.20240310", "pyink==24.10.0",] [tool.uv] -required-version = "0.6.1" +required-version = "0.6.2" [[tool.uv.index]] name = "pypi" url = "https://pypi.org/simple"