Skip to content

Merge pull request #4 from UST-DeMAF/ES-57 #13

Merge pull request #4 from UST-DeMAF/ES-57

Merge pull request #4 from UST-DeMAF/ES-57 #13

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