Skip to content
Snippets Groups Projects
Unverified Commit 62c4806e authored by Łukasz Łopatowski's avatar Łukasz Łopatowski Committed by GitHub
Browse files

Merge pull request #203 from nmaas-platform/202-add-ci-action-build-a-docker-image-with-release-tag

202 add ci action build a docker image with release tag
parents 2c2d3be3 c0bdf32d
No related branches found
No related tags found
No related merge requests found
name: Build docker image with tag latest
name: Build docker image with appropriate tag
on:
push:
branches:
- develop
release:
types: [released]
jobs:
build_docker_image:
runs-on: ubuntu-22.04
steps:
- name: Determine Docker Tag
id: docker_tag
run: |
GIT_EVENT=${{ github.event_name }}
GIT_BRANCH_NAME=${GITHUB_REF##*/}
if [[ $GIT_EVENT == 'push' && $GIT_BRANCH_NAME == 'develop' ]]; then
echo "DOCKER_TAG=latest" >> $GITHUB_ENV
elif [[ $GIT_EVENT == 'release' ]]; then
GIT_TAG_NAME=${{ github.event.release.tag_name }}
echo "DOCKER_TAG=$(echo $GIT_TAG_NAME | cut -c 2-)" >> $GITHUB_ENV
fi
- name: Checkout code
uses: actions/checkout@v4
......@@ -26,6 +40,7 @@ jobs:
- name: Build image and push to Artifactory
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: |
${{ secrets.DOCKER_REPOSITORY_LOCAL }}:latest
\ No newline at end of file
${{ secrets.DOCKER_REPOSITORY_LOCAL }}:${{ env.DOCKER_TAG }}
\ No newline at end of file
......@@ -5,7 +5,7 @@ plugins {
id "org.sonarqube" version "3.2.0"
}
version = '1.6.0-SNAPSHOT'
version = '1.6.0'
task buildGUI(type: Exec) {
println 'Building using Angular CLI'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment