Skip to content

Modify the tagging for the manifest list creation #62

Modify the tagging for the manifest list creation

Modify the tagging for the manifest list creation #62

Workflow file for this run

name: humble-build
on:
push:
branches: [ humble ]
paths-ignore:
- 'README.md'
pull_request:
branches: [ humble ]
workflow_dispatch:
inputs:
push_to_docker:
description: 'Push packages to docker image?'
required: true
default: true
type: boolean
permissions:
contents: read
packages: write
env:
ROS_DISTRO: humble
jobs:
tii-deb-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
architecture: [amd64, arm64]
steps:
- name: Checkout rmw_fastrtps
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.architecture }}
- name: Run deb package build
env:
ROS: 1
IMAGE_NAME: tii_fastdds_builder
run: |
set -eux
mkdir bin
git config --global user.email "[email protected]"
git config --global user.name "ci"
PLATFORM=linux/${{ matrix.architecture }} ./build.sh ./bin/
- uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/tiiuae/tii-fastdds-artifacts
tags: |
type=ref,event=branch,suffix=-${{ matrix.architecture }}
type=ref,event=pr,suffix=-${{ matrix.architecture }}
type=semver,pattern={{version}},suffix=-${{ matrix.architecture }}
type=sha,suffix=-${{ matrix.architecture }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build tii-fastdds-artifacts image and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/${{ matrix.architecture }}
file: ./Dockerfile.deb_packages
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: fastdds_debs_${{ matrix.architecture }}
path: bin/*.deb
retention-days: 14
merge_images:
runs-on: ubuntu-latest
needs: tii-deb-build
if: (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push_to_docker))
steps:
- name: Checkout rmw_fastrtps
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/tiiuae/tii-fastdds-artifacts
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create combined image manifests
run: |
echo "Debug: Tags are ${{ steps.meta.outputs.tags }}"
for tag in ${{ steps.meta.outputs.tags }}; do
echo "Creating manifest for tag: $tag"
docker manifest create "$tag" \
"$tag-amd64" \
"$tag-arm64"
docker manifest push "$tag"
done