Skip to content

Commit

Permalink
Added tags and ref_type for conditional build on release
Browse files Browse the repository at this point in the history
  • Loading branch information
MukuFlash03 committed Oct 1, 2024
1 parent 5d4c6e8 commit ada8144
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/image_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: docker image
on:
push:
branches: [ master, gis-based-mode-detection, cleanup-cicd ]
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

# Dockerhub credentials are set as environment variables
env:
Expand Down Expand Up @@ -43,11 +45,15 @@ jobs:
steps:
- name: Print commit info
run: |
echo "Commit author: ${{ github.event.commits[0].author.name }}"
echo "Commit message: ${{ github.event.head_commit.message }}"
echo "Head commit author: ${{ github.event.head_commit.author.name }}"
echo "Event name: ${{ github.event_name }}"
echo "Actor: ${{ github.actor }}"
echo "Ref: ${{ github.ref }}"
echo "Ref name: ${{ github.ref_name }}"
echo "Ref type: ${{ github.ref_type }}"
echo "Default branch: ${{ github.event.repository.default_branch }}"
echo "Github event base ref: ${{ github.event.base_ref }}"
test-with-docker:
uses: MukuFlash03/e-mission-server/.github/workflows/test-with-docker.yml@cleanup-cicd
Expand All @@ -58,6 +64,7 @@ jobs:
build:
runs-on: ubuntu-latest
needs: [test-with-docker, test-with-manual-install]
if: github.ref_type == 'tag'

outputs:
date: ${{ steps.date.outputs.date }}
Expand Down

0 comments on commit ada8144

Please sign in to comment.