Publish skupper-router main #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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: self-hosted-arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 mkdir -p /etc/apt/keyrings | |
curl -fsSL https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_$(lsb_release -rs)/Release.key \ | |
| gpg --dearmor \ | |
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\ | |
https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_$(lsb_release -rs)/ /" \ | |
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null | |
sudo apt-get update -qq | |
sudo apt-get -qq -y install podman | |
podman version | |
# temporary fix for https://github.com/containers/podman/issues/21024 | |
wget https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/amd64/conmon_2.1.2~0_amd64.deb -O /tmp/conmon_2.1.2.deb | |
sudo apt install /tmp/conmon_2.1.2.deb | |
# Starting systemd user service | |
systemctl --user start podman.socket | |
- 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 }}' | |