diff --git a/.github/workflows/update-commit-latest-env.yaml b/.github/workflows/update-commit-latest-env.yaml index f91a61294c..1e03b111fe 100644 --- a/.github/workflows/update-commit-latest-env.yaml +++ b/.github/workflows/update-commit-latest-env.yaml @@ -10,7 +10,7 @@ name: Update commit-latest.env on params-latest.env change - main - rhoai-* paths: - - 'manifests/base/params-latest.env' + - 'manifests/odh/base/params-latest.env' jobs: sync-commit: @@ -27,10 +27,18 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} persist-credentials: true + - name: Install Skopeo CLI + uses: ./.github/actions/apt-install + with: + packages: skopeo + + - name: Setup uv and Python + uses: ./.github/actions/setup-uv + - name: Update manifests/base/commit-latest.env id: update_env run: | - python3 scripts/update-commit-latest-env.py + ./uv run python scripts/update-commit-latest-env.py - name: Commit and push changes run: | diff --git a/scripts/update-commit-latest-env.py b/scripts/update-commit-latest-env.py index 3ac657cd09..d2f34880ec 100644 --- a/scripts/update-commit-latest-env.py +++ b/scripts/update-commit-latest-env.py @@ -101,7 +101,7 @@ async def inspect(images_to_inspect: typing.Iterable[str]) -> list[tuple[str, st async def main(): - with open(PROJECT_ROOT / "manifests/base/params-latest.env", "rt") as file: + with open(PROJECT_ROOT / "manifests/odh/base/params-latest.env", "rt") as file: images_to_inspect: list[list[str]] = [line.strip().split('=', 1) for line in file.readlines() if line.strip() and not line.strip().startswith("#")] @@ -116,7 +116,7 @@ async def main(): _, commit_hash = result output.append((re.sub(r'-n$', "-commit-n", variable), commit_hash[:7])) - with open(PROJECT_ROOT / "manifests/base/commit-latest.env", "wt") as file: + with open(PROJECT_ROOT / "manifests/odh/base/commit-latest.env", "wt") as file: for line in sorted(output): print(*line, file=file, sep="=", end="\n")