Skip to content

[TS-1574] Sailfish updated from 3.3.13 to 3.3.144 #232

[TS-1574] Sailfish updated from 3.3.13 to 3.3.144

[TS-1574] Sailfish updated from 3.3.13 to 3.3.144 #232

name: Dev build and publish Docker distributions to Github Container Registry ghcr.io
on:
push:
branches-ignore:
- master
- version-*
- dependabot**
paths-ignore:
- README.md
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
# Prepare custom build version
- name: Get branch name
id: branch
run: echo ::set-output name=branch_name::${GITHUB_REF#refs/*/}
- name: Get release_version
id: ver
uses: christian-draeger/[email protected]
with:
path: gradle.properties
property: release_version
- name: Build custom release version
id: release_ver
run: echo ::set-output name=value::"${{ steps.ver.outputs.value }}-${{ steps.branch.outputs.branch_name }}-${{ github.run_id }}"
- 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@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- run: echo "::set-output name=REPOSITORY_NAME::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')"
id: meta
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
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 }}