Skip to content

add context

add context #6

Workflow file for this run

name: Build libra-data and dlu-watcher docker image
on:
push:
jobs:
docker:
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: Checkout project sources
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.ENV_DOCKER_USER }}
password: ${{ secrets.ENV_DOCKER_PASS }}
-
name: Build and push data-management image for develop branch
if: steps.branch-names.outputs.current_branch == 'develop'
uses: docker/build-push-action@v6
with:
context: .
push: true
tags:
"kingstonduo/data-management:$IMAGE_TAG"
-
name: Build and push dlu-watcher image for develop branch
if: steps.branch-names.outputs.current_branch == 'develop'
uses: docker/build-push-action@v6
with:
context: .
push: true
file: "./DluWatcher"
tags:
"kingstonduo/data-management:$IMAGE_TAG"
-
name: Build and push data-management image for non develop branch
if: steps.branch-names.outputs.current_branch != 'develop'
uses: docker/build-push-action@v6
with:
context: .
push: true
tags:
"kingstonduo/data-management:${{steps.branch-names.outputs.current_branch}}"
-
name: Build and push dlu-watcher image for non develop branch
if: steps.branch-names.outputs.current_branch != 'develop'
uses: docker/build-push-action@v6
with:
context: .
push: true
file: "./DluWatcher"
tags:
"kingstonduo/data-management:${{steps.branch-names.outputs.current_branch}}"