Skip to content

Bump org.apache.maven.plugins:maven-compiler-plugin in /backend (#22) #41

Bump org.apache.maven.plugins:maven-compiler-plugin in /backend (#22)

Bump org.apache.maven.plugins:maven-compiler-plugin in /backend (#22) #41

# SPDX-FileCopyrightText: 2025 ICRC
#
# SPDX-License-Identifier: BSD-3-Clause
name: Publish OpenMRS Backend docker image
on:
workflow_dispatch:
push:
branches:
- main
paths:
- backend/**
env:
REGISTRY: ghcr.io
IMAGE_NAME: openmrs-backend
IMAGE_VERSION: 2.5.13
IMAGE_TAG: latest
CONTEXT: ./backend
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- 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 }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ env.IMAGE_VERSION }}-${{ env.IMAGE_TAG }}
type=sha,prefix=${{ env.IMAGE_VERSION }}-
- name: Build and push Backend Docker image
uses: docker/build-push-action@v6
with:
context: ${{ env.CONTEXT }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
secrets: |
"m2settings=<settings>
<servers>
<server>
<id>openmrs-module-fhir2extension</id>
<username>${{ github.actor }}</username>
<password>${{ secrets.GITHUB_TOKEN }}</password>
</server>
</servers></settings>"