Skip to content

Merge pull request #2 from UST-DeMAF/ES-61 #15

Merge pull request #2 from UST-DeMAF/ES-61

Merge pull request #2 from UST-DeMAF/ES-61 #15

name: buildAndPushImage
on:
push:
branches:
- 'main'
- 'dev'
pull_request:
branches:
- 'main'
env:
IMAGE_NAME: analysis-manager
IMAGE_TAG: ${{ github.ref == 'refs/heads/main' && 'latest' || 'testing' }}
jobs:
build-with-paketo-push-2-dockerhub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to DockerHub Container Registry
run: echo $DOCKER_HUB_TOKEN | docker login -u well5a --password-stdin
env:
DOCKER_HUB_TOKEN: ${{ secrets.DOCKERHUBTOKEN }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag well5a/$IMAGE_NAME:$IMAGE_TAG
- name: Push the Docker image
run: docker push well5a/$IMAGE_NAME:$IMAGE_TAG