Update changelog.md #37
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: Build atlas-file-service docker image | |
on: | |
push: | |
jobs: | |
build-project: | |
env: | |
IMAGE_TAG: 3.5 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get branch names | |
id: branch-names | |
uses: tj-actions/branch-names@v8 | |
- name: Get current branch name | |
if: steps.branch-names.outputs.is_default == 'false' | |
run: | | |
echo "Running on branch: ${{ steps.branch-names.outputs.current_branch }}" | |
- name: Login to Docker Hub | |
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
with: | |
username: ${{ secrets.ENV_DOCKER_USER }} | |
password: ${{ secrets.ENV_DOCKER_PASS }} | |
- name: Build and push to Docker Hub if branch is develop | |
if: steps.branch-names.outputs.current_branch == 'develop' | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: kingstonduo/atlas-file-service:${{ env.IMAGE_TAG }} | |
- name: Build and push to Docker Hub if branch is not develop | |
if: steps.branch-names.outputs.current_branch != 'develop' | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: kingstonduo/atlas-file-service:${{ steps.branch-names.outputs.current_branch }} |