Skip to content

Updated documentation #9

Updated documentation

Updated documentation #9

name: JDI QASP Docker image build workflow
on:
workflow_call:
push:
tags:
- '*'
pull_request:
branches:
- master
env:
RUN_ON_RC: ${{ startsWith( github.head_ref, 'release/' ) }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/jdi-testing/jdi-qasp-ml
labels: |
maintainer=github.com/jdi-testing
org.opencontainers.image.title=JDI QASP ML
org.opencontainers.image.description=Backend for JDN Chrome plugin
tags: |
type=ref,event=branch
type=ref,event=pr,enable=${{ env.RUN_ON_RC == 'false' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=rc,enable=${{ env.RUN_ON_RC == 'true' }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up default environment
run: cp .env.dist .env
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}