Skip to content

Added utility script and pipeline to build/push Docker image #2

Added utility script and pipeline to build/push Docker image

Added utility script and pipeline to build/push Docker image #2

name: DockerBuildPush
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: docker/login-action@v1
with:
registry: ${{ secrets.DOCKER_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_USER }}
password: ${{ secrets.DOCKER_REGISTRY_PASS }}
- uses: actions/checkout@v3
- name: BuildAndPushImageOnHarbor
run: |
docker build ./ -t ${{ secrets.DOCKER_REGISTRY_URL }}/breizhcamp/kalon:${{ github.run_number }}
docker push ${{ secrets.DOCKER_REGISTRY_URL }}/breizhcamp/kalon:${{ github.run_number }}