-
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (62 loc) · 2.06 KB
/
publish-3.13.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: publish-3.13
on:
push:
branches:
- 'coatl'
paths:
- '.github/workflows/publish-3.13.yml'
- '3.13/**'
schedule:
- cron: '0 20 * * 0,4'
jobs:
tagger:
runs-on: ubuntu-latest
outputs:
major: ${{ steps.tags.outputs.major }}
major_minor: ${{ steps.tags.outputs.major_minor }}
version: ${{ steps.tags.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract version number
id: tags
run: |
# Extract the Python version from the Dockerfile
VERSION=$(grep 'ENV PYTHON_VERSION' 3.13/bookworm/Dockerfile | cut -d '=' -f 2)
echo "VERSION=${VERSION}"
# Trim the version to the first two segments (major.minor)
MAJOR_MINOR=$(echo $VERSION | cut -d'.' -f1-2)
echo "MAJOR_MINOR=${MAJOR_MINOR}"
# Trim the version to the first segment (major)
MAJOR=$(echo $VERSION | cut -d'.' -f1-1)
echo "MAJOR=${MAJOR}"
# Export the extracted version to GITHUB_OUTPUT
echo "major=${MAJOR}" >> $GITHUB_OUTPUT
echo "major_minor=${MAJOR_MINOR}" >> $GITHUB_OUTPUT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
publish:
needs: tagger
uses: ./.github/workflows/publish.yml
strategy:
matrix:
image:
- version: '3.13'
variant: bookworm
tags: |
${{ needs.tagger.outputs.major }}
${{ needs.tagger.outputs.major_minor }}
${{ needs.tagger.outputs.version }}
- version: '3.13'
variant: slim-bookworm
tags: |
${{ needs.tagger.outputs.major }}-slim
${{ needs.tagger.outputs.major_minor }}-slim
${{ needs.tagger.outputs.version }}-slim
with:
image: coatldev/python
version: ${{ matrix.image.version }}
variant: ${{ matrix.image.variant }}
tags: ${{ matrix.image.tags }}
username: ${{ vars.DOCKERHUB_USERNAME }}
secrets:
password: ${{ secrets.DOCKERHUB_TOKEN }}