Skip to content

Tag & Release

Tag & Release #74

Workflow file for this run

name: Tag & Release
on:
workflow_dispatch:
jobs:
release:
strategy:
matrix:
job:
- runner: buildjet-4vcpu-ubuntu-2204
arch: amd64
- runner: buildjet-4vcpu-ubuntu-2204-arm
arch: arm64
name: Release - ${{ matrix.job.arch }}
runs-on: ${{ matrix.job.runner }}
outputs:
published: ${{ steps.release.outputs.published }}
version: ${{ steps.release.outputs.version }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: v0.10.2
- name: Docker Login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.API_TOKEN_GITHUB }}
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v2
- name: Install npm dependencies
run: yarn install --frozen-lockfile
- name: Release
id: release
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
GITHUB_USER: ${{ github.actor }}
run: yarn run semantic-release --extends ./release.config.${{ matrix.job.arch }}.js --tag-format='${version}-${{ matrix.job.arch }}'
create-manifest:
name: Create Multi-Arch Manifest
runs-on: buildjet-2vcpu-ubuntu-2204
needs: release
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.API_TOKEN_GITHUB }}
- name: Create Manifest
shell: bash
if: needs.release.outputs.published == 'true'
run: |
echo Published ${{ needs.release.outputs.published }}
echo Version ${{ needs.release.outputs.version }}
docker manifest create ghcr.io/greenroom-robotics/ros_builder:jazzy-latest \
ghcr.io/greenroom-robotics/ros_builder:jazzy-latest-amd64 \
ghcr.io/greenroom-robotics/ros_builder:jazzy-latest-arm64
docker manifest create ghcr.io/greenroom-robotics/ros_builder:jazzy-latest-cuda \
ghcr.io/greenroom-robotics/ros_builder:jazzy-latest-cuda-amd64 \
ghcr.io/greenroom-robotics/ros_builder:jazzy-latest-cuda-arm64
docker manifest create ghcr.io/greenroom-robotics/ros_builder:jazzy-${{ needs.release.outputs.version }} \
ghcr.io/greenroom-robotics/ros_builder:jazzy-${{ needs.release.outputs.version }}-amd64 \
ghcr.io/greenroom-robotics/ros_builder:jazzy-${{ needs.release.outputs.version }}-arm64
docker manifest create ghcr.io/greenroom-robotics/ros_builder:jazzy-${{ needs.release.outputs.version }}-cuda \
ghcr.io/greenroom-robotics/ros_builder:jazzy-${{ needs.release.outputs.version }}-cuda-amd64 \
ghcr.io/greenroom-robotics/ros_builder:jazzy-${{ needs.release.outputs.version }}-cuda-arm64
docker manifest push ghcr.io/greenroom-robotics/ros_builder:jazzy-latest
docker manifest push ghcr.io/greenroom-robotics/ros_builder:jazzy-latest-cuda
docker manifest push ghcr.io/greenroom-robotics/ros_builder:jazzy-${{ needs.release.outputs.version }}
docker manifest push ghcr.io/greenroom-robotics/ros_builder:jazzy-${{ needs.release.outputs.version }}-cuda