Skip to content

docker-build-and-push #12

docker-build-and-push

docker-build-and-push #12

name: "docker-build-and-push"
on:
push:
branches:
- "main"
- "**"
workflow_dispatch:
jobs:
docker-build-and-push:
runs-on: ubuntu-latest
steps:
- name: add builder
run: |
docker run --privileged --rm tonistiigi/binfmt --install all \
&& docker buildx create --use
- name: checkout repository
uses: actions/checkout@v3
- name: login into repository
run: echo ${{ secrets.DOCKER_REGISTRY_PASSWORD }} |
docker login --username ${{ secrets.DOCKER_REGISTRY_USERNAME }}
--password-stdin ${{ secrets.DOCKER_REGISTRY_URL }}
- name: build and push
run: ./docker-build.sh --push