Skip to content

Commit 99c66e1

Browse files
committed
Automatically use latest release of pyenv
1 parent 8bc48ae commit 99c66e1

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/build-root.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,27 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12+
pyenv-version:
13+
name: Find latest pyenv version
14+
runs-on: ubuntu-latest
15+
outputs:
16+
pyenv_version: ${{ steps.get_pyenv_version.outputs.pyenv_version }}
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v5
20+
with:
21+
repository: pyenv/pyenv
22+
fetch-depth: 0
23+
fetch-tags: true
24+
25+
- name: Get latest pyenv version
26+
id: get_pyenv_version
27+
run: |
28+
git describe --abbrev=0 --tags
29+
1230
build-base:
31+
name: Build Python Builder Base
32+
needs: pyenv-version
1333
runs-on: ubuntu-latest
1434
steps:
1535
- name: Checkout code
@@ -33,9 +53,14 @@ jobs:
3353
push: true
3454
cache-to: type=inline
3555
cache-from: type=registry,ref=ghcr.io/python-discord/python-builds:builder-base
36-
tags: ghcr.io/python-discord/python-builds:builder-base
56+
build-args: |
57+
PYENV_VERSION=${{ needs.pyenv-version.outputs.pyenv_version }}
58+
tags: |
59+
ghcr.io/python-discord/python-builds:builder-base
60+
ghcr.io/python-discord/python-builds:builder-base-${{ needs.pyenv-version.outputs.pyenv_version }}
3761
3862
resolve-versions:
63+
name: Resolve Python Versions
3964
runs-on: ubuntu-latest
4065
needs: build-base
4166
outputs:
@@ -52,6 +77,7 @@ jobs:
5277
echo "resolved_versions=$resolved_versions" >> $GITHUB_OUTPUT
5378
5479
build-versions:
80+
name: Build Python Versions
5581
needs: [build-base, resolve-versions]
5682
strategy:
5783
matrix:

0 commit comments

Comments
 (0)