Skip to content

Commit a454097

Browse files
committed
Use versioned tags to identify Fedora version we use
1 parent 7d6d63a commit a454097

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

.github/workflows/build-and-push.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
schedule:
1111
- cron: '48 23 * * 6'
1212

13+
env:
14+
FEDORA_VERSION: 34
15+
1316
jobs:
1417
build-and-push:
1518
name: Build, test and push
@@ -38,7 +41,9 @@ jobs:
3841
context: .
3942
platforms: linux/${{ matrix.arch }}
4043
load: true
41-
tags: fedorapython/fedora-python-tox:${{ matrix.arch }}
44+
tags: |
45+
fedorapython/fedora-python-tox:${{ matrix.arch }}
46+
fedorapython/fedora-python-tox:${{ matrix.arch }}-f${{ env.FEDORA_VERSION }}
4247
- name: Test local project
4348
env:
4449
TOXENV: ${{ matrix.toxenv }}
@@ -72,10 +77,12 @@ jobs:
7277
context: .
7378
platforms: linux/${{ matrix.arch }}
7479
push: true
75-
tags: fedorapython/fedora-python-tox:${{ matrix.arch }}
80+
tags: |
81+
fedorapython/fedora-python-tox:${{ matrix.arch }}
82+
fedorapython/fedora-python-tox:${{ matrix.arch }}-f${{ env.FEDORA_VERSION }}
7683
7784
release:
78-
name: 'Update and test the :latest manifest'
85+
name: 'Update and test manifests'
7986
if: github.event_name == 'push' || github.event_name == 'schedule'
8087
needs: build-and-push
8188
runs-on: ubuntu-latest
@@ -89,6 +96,7 @@ jobs:
8996
run: >
9097
for arch in amd64 arm64 ppc64le s390x; do
9198
docker pull fedorapython/fedora-python-tox:$arch;
99+
docker pull fedorapython/fedora-python-tox:${arch}-f${{ env.FEDORA_VERSION }};
92100
done
93101
- name: Create and push manifest for the :latest tag
94102
env:
@@ -103,3 +111,16 @@ jobs:
103111
- name: Test the latest manifest
104112
run: |
105113
docker manifest inspect fedorapython/fedora-python-tox:latest | grep '"architecture":' | grep -Ez '(.*(amd64|arm64|ppc64le|s390x).*){4}'
114+
- name: Create and push manifest for the versioned tag
115+
env:
116+
DOCKER_CLI_EXPERIMENTAL: enabled
117+
run: >
118+
docker manifest create fedorapython/fedora-python-tox:f${{ env.FEDORA_VERSION }}
119+
fedorapython/fedora-python-tox:amd64-f${{ env.FEDORA_VERSION }}
120+
fedorapython/fedora-python-tox:arm64-f${{ env.FEDORA_VERSION }}
121+
fedorapython/fedora-python-tox:ppc64le-f${{ env.FEDORA_VERSION }}
122+
fedorapython/fedora-python-tox:s390x-f${{ env.FEDORA_VERSION }};
123+
docker manifest push fedorapython/fedora-python-tox:f${{ env.FEDORA_VERSION }};
124+
- name: Test the versioned manifest
125+
run: |
126+
docker manifest inspect fedorapython/fedora-python-tox:f${{ env.FEDORA_VERSION }} | grep '"architecture":' | grep -Ez '(.*(amd64|arm64|ppc64le|s390x).*){4}'

0 commit comments

Comments
 (0)