Skip to content

Add more metadata to docker image #8

Add more metadata to docker image

Add more metadata to docker image #8

name: Generate Toolchain Docker Images
on:
push:
branches:
- master
paths:
- utils/dc-chain/scripts/**
- utils/dc-chain/patches/**
- utils/dc-chain/profiles/**
- utils/dc-chain/Makefile
- utils/dc-chain/Makefile.default.cfg
- utils/dc-chain/docker/Dockerfile
permissions:
packages: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- { tag: "13.3-legacy", dc_chain: "legacy", meta_data: "version=13.3.0 type=legacy" }
- { tag: "14.2-stable", dc_chain: "stable", meta_data: "version=14.2.0 type=stable" }
- { tag: "15.0-dev", dc_chain: "dev", meta_data: "version=15.0.0 type=dev" }
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Convert Repository Owner to Lowercase
id: lower-owner
run: |
echo "repository_owner=${GITHUB_REPOSITORY%%/*}" | tr '[:upper:]' '[:lower:]' >> $GITHUB_OUTPUT
- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
context: utils/dc-chain/docker
file: utils/dc-chain/docker/Dockerfile
push: true
tags: ghcr.io/${{ steps.lower-owner.outputs.repository_owner }}/dc-toolchain:${{ matrix.version.tag }}
build-args: |
dc_chain=${{ matrix.version.dc_chain }}
dynamic_labels=${{ matrix.version.meta_data }}
makejobs=8
enable_objc=0
enable_objcpp=0
no-cache: true