[th2-4504] migrate event healer to th2-processor-core base and book p… #59
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dev build and publish Docker distributions to Github Container Registry ghcr.io | |
on: | |
push: | |
branches-ignore: | |
- master | |
- version-* | |
# paths: | |
# - gradle.properties | |
# - package_info.json | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
# Prepare custom build version | |
- name: Get branch name | |
id: branch | |
run: echo "branch_name=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Get SHA of the commit | |
id: sha | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Get release_version | |
id: ver | |
uses: christian-draeger/[email protected] | |
with: | |
path: gradle.properties | |
properties: release_version | |
- name: Build custom release version | |
id: release_ver | |
run: echo value="${{ steps.ver.outputs.release_version }}-${{ steps.branch.outputs.branch_name }}-${{ github.run_id }}-${{ steps.sha.outputs.sha_short }}" >> $GITHUB_OUTPUT | |
- name: Show custom release version | |
run: echo ${{ steps.release_ver.outputs.value }} | |
# Build and publish image | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_OUTPUT | |
id: meta | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
tags: ghcr.io/${{ github.repository }}:${{ steps.release_ver.outputs.value }} | |
labels: com.exactpro.th2.${{ steps.meta.outputs.REPOSITORY_NAME }}=${{ steps.ver.outputs.value }} |