Build specific AHD Recommender Version #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |