Skip to content

Build specific AHD Recommender Version #2

Build specific AHD Recommender Version

Build specific AHD Recommender Version #2

name: Build specific AHD Recommender Version
on:
workflow_dispatch:
inputs:
version:
description: 'Version tag suffix of the resulting docker image'
default: 'latest'
required: true
type: string
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/inception-ahd-recommender
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} # automatically generated
- name: downcase IMAGE_NAME
run: |
echo "IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: ./inception_ahd_recommender
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.version }}