Skip to content

Docker image build fix #20

Docker image build fix

Docker image build fix #20

name: Build and push Docker image
on:
# For the manual run.
workflow_dispatch:
push:
branches: [ "master" ]
paths:
- 'docker/build-image/**'
- '.github/workflows/docker-build-image.yml'
pull_request:
branches: [ "master" ]
paths:
- 'docker/build-image/**'
- '.github/workflows/docker-build-image.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_LOGIN }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v4
- name: Build the Docker image for KNP build
working-directory: docker/build-image
run: |
docker build . --file Dockerfile --tag ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image && \
docker push ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image
timeout-minutes: 180 # Adjust the timeout as needed
continue-on-error: false