Skip to content

Publish skupper-router main #37

Publish skupper-router main

Publish skupper-router main #37

Workflow file for this run

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
name: Publish skupper-router main
on:
workflow_run:
workflows: ["Build"]
branches: [main]
types:
- completed
jobs:
build-image-amd64:
name: Publish skupper-router amd64 image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish the main amd64 image
run: |
# The version on main will be 0.0.0+<commit-sha>-main
export VERSION="0.0.0+${GITHUB_SHA}-main"
export PLATFORM=amd64
unset PUSH_LATEST
./.github/scripts/image.sh
env:
CONTAINER_USER: '${{ secrets.DOCKER_USER }}'
CONTAINER_PASSWORD: '${{ secrets.DOCKER_PASSWORD }}'
build-image-arm64:
name: Publish skupper-router arm64 image
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Install podman
run: |
sudo apt-get update -qq
sudo apt-get -qq -y install podman
podman version
# Starting systemd user service
systemctl --user start podman.socket
echo "PODMAN_SOCK=/run/user/${UID}/podman/podman.sock" >> $GITHUB_ENV
echo "DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock" >> $GITHUB_ENV
- name: Build and publish the main arm64 image
run: |
# The version on main will be 0.0.0+<commit-sha>-main
export VERSION="0.0.0+${GITHUB_SHA}-main"
unset PUSH_LATEST
export PLATFORM=arm64
./.github/scripts/image.sh
env:
CONTAINER_USER: '${{ secrets.DOCKER_USER }}'
CONTAINER_PASSWORD: '${{ secrets.DOCKER_PASSWORD }}'
# This job pulls the images produced by the build-image-amd64 and build-image-arm64 jobs
create-manifest:
needs: [build-image-amd64, build-image-arm64]
name: Pull skupper-router amd64 and arm64 images and create/push manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install podman
run: |
sudo apt-get update -qq
sudo apt-get -qq -y install podman
podman version
# Starting systemd user service
systemctl --user start podman.socket
echo "PODMAN_SOCK=/run/user/${UID}/podman/podman.sock" >> $GITHUB_ENV
echo "DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock" >> $GITHUB_ENV
- name: Pull skupper-router amd64 and arm64 images and create/push manifest
run: |
# This is the main build which means we WON'T push the :latest tag to the container repo.
unset PUSH_LATEST
./.github/scripts/manifest.sh
env:
CONTAINER_USER: '${{ secrets.DOCKER_USER }}'
CONTAINER_PASSWORD: '${{ secrets.DOCKER_PASSWORD }}'