Skip to content

Feature/root build

Feature/root build #11

Workflow file for this run

name: Build ROOT
on:
pull_request:
push:
tags: ['root_v*']
workflow_dispatch:
env:
REGISTRY: ghcr.io
BASE_REPO: ubuntu
BASE_TAG: "22.04"
ROOT_TAG: "root_v6.28.06"
NARG: 2
jobs:
build-and-publish:
name: Build and push the docker images
strategy:
matrix:
build: [Dev]
include:
- push: true
# - push: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
- build: Dev
tag-suffix: '-dev'
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
submodules: recursive
# Need to avoid a shallow clone (fetch-depth=1) so that the lookup of the tag works
fetch-depth: 0
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
flavor: |
latest=auto
suffix=${{ matrix.tag-suffix }},onlatest=true
tags: |
type=semver,pattern={{raw}}
type=ref,event=branch
type=ref,event=pr
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: setup_buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
id: build
uses: docker/build-push-action@v5
with:
context: .
file: Root/Dockerfile
# push: ${{ matrix.push }}
push: false
build-args: |
img_repo=${{ env.BASE_REPO }}
img_tag=${{ env.BASE_TAG }}
root_tag=${{ env.ROOT_TAG }}
narg=${{ env.NARG }}
tags: ${{ env.REGISTRY }}/project8/luna_base_root:${{ env.ROOT_TAG }}
platforms: linux/arm64
# platforms: ${{ matrix.push && 'linux/amd64,linux/arm64' || 'linux/amd64' }}