Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/axonivy-market/marketplace
Browse files Browse the repository at this point in the history
…into develop

# Conflicts:
#	.github/workflows/docker-build.yml
  • Loading branch information
linhpd-axonivy committed Aug 6, 2024
2 parents 577a53b + cd38ce9 commit b76da05
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docker Release

on:
push:
branches: [ "master" ]
workflow_dispatch:
inputs:
image_version:
description: 'Marketplace Docker image version'
required: true
default: 'latest'

env:
UI_IMAGE_NAME: marketplace-ui
SERVICE_IMAGE_NAME: marketplace-service

jobs:

build:
uses: ./.github/workflows/docker-build.yml

release:
needs: build
runs-on: self-hosted
permissions:
packages: write
contents: read

steps:
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Refine release version
run: |
# This strips the git ref prefix from the version.
VERSION=${{ github.event.inputs.image_version }}
# This uses the Docker `latest` tag convention.
[ "$VERSION" == "main" ] && VERSION=latest
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Release Marketplace UI image
run: |
UI_IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$UI_IMAGE_NAME
docker tag $UI_IMAGE_NAME $UI_IMAGE_ID:$VERSION
docker push $UI_IMAGE_ID:$VERSION
- name: Release Marketplace Service image
run: |
SERVICE_IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$SERVICE_IMAGE_NAME
docker tag $SERVICE_IMAGE_NAME $SERVICE_IMAGE_ID:$VERSION
docker push $SERVICE_IMAGE_ID:$VERSION

0 comments on commit b76da05

Please sign in to comment.