summaryrefslogtreecommitdiff
path: root/.github/workflows/multi-arch-build.yaml
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2021-05-21 14:39:01 -0400
committerChris Evich <cevich@redhat.com>2021-05-21 14:39:01 -0400
commit3c82059c3d0e91f5890caf6a9ee0a55655e0f0cf (patch)
tree663396c352298edae6390768eda6d6ba726de052 /.github/workflows/multi-arch-build.yaml
parent490915c68e6fce48508d42d138ac1c92c877abe7 (diff)
downloadpodman-3c82059c3d0e91f5890caf6a9ee0a55655e0f0cf.tar.gz
podman-3c82059c3d0e91f5890caf6a9ee0a55655e0f0cf.tar.bz2
podman-3c82059c3d0e91f5890caf6a9ee0a55655e0f0cf.zip
Sync. workflow across skopeo, buildah, and podman
Besides adding ***BIG FAT WARNING*** this commit updates the containers-repo. logic to only (and properly) handle the `stable` image (both version and `latest` tags). This change was already discussed at length with @TomSweeneyRedHat. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to '.github/workflows/multi-arch-build.yaml')
-rw-r--r--.github/workflows/multi-arch-build.yaml42
1 files changed, 20 insertions, 22 deletions
diff --git a/.github/workflows/multi-arch-build.yaml b/.github/workflows/multi-arch-build.yaml
index 0f8a3df7e..2ade44ee6 100644
--- a/.github/workflows/multi-arch-build.yaml
+++ b/.github/workflows/multi-arch-build.yaml
@@ -2,6 +2,11 @@
# Please see contrib/podmanimage/README.md for details on the intentions
# of this workflow.
+#
+# BIG FAT WARNING: This workflow is duplicated across containers/skopeo,
+# containers/buildah, and containers/podman. ANY AND
+# ALL CHANGES MADE HERE MUST BE MANUALLY DUPLICATED
+# TO THE OTHER REPOS.
name: build multi-arch images
@@ -86,7 +91,7 @@ jobs:
docker://$PODMAN_QUAY_REGISTRY/stable | \
jq -r '.Tags[]')
- # New image? Push quay.io/podman/stable:vX.X.X and :latest
+ # New version? Push quay.io/podman/stable:vX.X.X and :latest
if ! fgrep -qx "$VERSION" <<<"$ALLTAGS"; then
# Assume version-tag is also the most up to date (i.e. "latest")
FQIN="$PODMAN_QUAY_REGISTRY/stable:$VERSION,$PODMAN_QUAY_REGISTRY/stable:latest"
@@ -108,31 +113,24 @@ jobs:
echo "::set-output name=fqin::${FQIN}"
echo '::set-output name=push::true'
- # This is substantially the same as the above step, except the
- # $CONTAINERS_QUAY_REGISTRY is used and the "testing"
- # flavor is never pushed.
+ # This is substantially similar to the above logic,
+ # but only handles $CONTAINERS_QUAY_REGISTRY for
+ # the stable "latest" and named-version tagged images.
- name: Generate containers reg. image FQIN(s)
- if: matrix.source != 'testing'
+ if: matrix.source == 'stable'
id: containers_reg
run: |
- if [[ "${{ matrix.source }}" == 'stable' ]]; then
- VERSION='v${{ steps.sniff_test.outputs.version }}'
- # workaround vim syntax-highlight bug: '
- ALLTAGS=$(skopeo list-tags \
- docker://$CONTAINERS_QUAY_REGISTRY/podman | \
- jq -r '.Tags[]')
-
- # New image? Push quay.io/containers/podman:vX.X.X and :latest
- if ! fgrep -qx "$VERSION" <<<"$ALLTAGS"; then
- FQIN="$CONTAINERS_QUAY_REGISTRY/podman:$VERSION,$CONTAINERS_QUAY_REGISTRY/podman:latest"
- else # Not a new version-tagged image, but contents may be updated
- FQIN="$CONTAINERS_QUAY_REGISTRY/podman:latest"
- fi
- elif [[ "${{ matrix.source }}" == 'upstream' ]]; then
+ VERSION='v${{ steps.sniff_test.outputs.version }}'
+ # workaround vim syntax-highlight bug: '
+ ALLTAGS=$(skopeo list-tags \
+ docker://$CONTAINERS_QUAY_REGISTRY/podman | \
+ jq -r '.Tags[]')
+
+ # New version? Push quay.io/containers/podman:vX.X.X and latest
+ if ! fgrep -qx "$VERSION" <<<"$ALLTAGS"; then
+ FQIN="$CONTAINERS_QUAY_REGISTRY/podman:$VERSION,$CONTAINERS_QUAY_REGISTRY/podman:latest"
+ else # Not a new version-tagged image, only update latest.
FQIN="$CONTAINERS_QUAY_REGISTRY/podman:latest"
- else
- echo "::error::Unknown matrix item '${{ matrix.source }}'"
- exit 1
fi
echo "::warning::Pushing $FQIN"
echo "::set-output name=fqin::${FQIN}"