Skip to content

Chore/#1739 - Create mkdocs.yml for all the services which have docum… #49

Chore/#1739 - Create mkdocs.yml for all the services which have docum…

Chore/#1739 - Create mkdocs.yml for all the services which have docum… #49

# This is a basic workflow to help you get started with Actions
name: Build Apps Service Image
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- 'master'
- 'release'
paths: [ 'packages/apps-service/**' ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
tags:
description: 'Image Tags (comma separated)'
default: latest
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Build and publish container image
build-apps-service:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Generate a short tag using GITHUB_SHA
run: echo "SHA_TAG=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
- if: github.event.inputs.tags == '' && startsWith(github.ref, 'refs/heads/master')
name: Generate QA tag
run: echo "TAGS=latest,qa" >> $GITHUB_ENV
- if: github.event.inputs.tags == '' && startsWith(github.ref, 'refs/heads/release')
name: Generate stable tag
run: echo "TAGS=stable" >> $GITHUB_ENV
# Build and publish docker container
- name: Build and publish to ghcr
uses: elgohr/Publish-Docker-Github-Action@3.04
with:
name: 1-Platform/apps-service
username: ${{ secrets.CR_ACTOR }}
password: ${{ secrets.CR_PAT }}
registry: ghcr.io
context: packages/apps-service
tags: "${{ github.event.inputs.tags || env.SHA_TAG }},${{ env.TAGS }}"