Skip to content

Merge pull request #20 from ordercloud-api/amrarick26-patch-1 #18

Merge pull request #20 from ordercloud-api/amrarick26-patch-1

Merge pull request #20 from ordercloud-api/amrarick26-patch-1 #18

Workflow file for this run

name: Publish Container Image To DockerHub
on:
# run it on push to the default repository branch
push:
branches: [dev]
# run it during pull request
pull_request:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# setup Docker buld action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image and push to Docker Hub
uses: docker/build-push-action@v2
with:
# relative path to the place where source code with Dockerfile is located
context: .
tags: |
oliverheywood/ordercloud-dotnet-middleware:latest
# build on feature branches, push only on dev branch
push: ${{ github.ref == 'refs/heads/dev' }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}