Skip to content

chore(main): release releases-maxa-ai 1.3.0 #11

chore(main): release releases-maxa-ai 1.3.0

chore(main): release releases-maxa-ai 1.3.0 #11

Workflow file for this run

name: Docker build and push
on:
push:
tags:
- "releases-maxa-ai-[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches:
- main
paths:
- "releases-maxa-ai/**"
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
value: ["releases-maxa-ai"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.PAT_OTTO }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.value }}
tags: |
type=match,pattern=-(\d+\.\d+\.\d+)$,group=1
type=match,pattern=-(\d+\.\d+)\.\d+$,group=1
type=match,pattern=-(\d+)\.\d+\.\d+$,group=1
labels: |
org.opencontainers.image.title=releases-maxa-ai
org.opencontainers.image.vendor=Maxa
org.opencontainers.image.url=https://${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.value }}
org.opencontainers.image.source=https://${{ env.REGISTRY }}/${{ github.repository }}/README.md
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: ${{ matrix.value }}
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}