Skip to content

Add docker automatic build based on Dockerfiles (#686) #15

Add docker automatic build based on Dockerfiles (#686)

Add docker automatic build based on Dockerfiles (#686) #15

Workflow file for this run

name: Build and Push dockers
on:
push:
branches:
- 'main'
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build ubuntu image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/owl:main
- name: Build debian image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile.debian
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/owl:debian
- name: Build fedora image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile.fedora
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/owl:fedora
- name: Build archlinux image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile.archlinux
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/owl:archlinux