Skip to content

Build and deploy docker images on dockerhub #16

Build and deploy docker images on dockerhub

Build and deploy docker images on dockerhub #16

name: Build and Deploy
run-name: Build and deploy docker images on dockerhub
on: [push, workflow_dispatch]
jobs:
build_base_job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Autenticate with Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Get debian-novnc Base Files
run: git clone https://github.com/B0nam/DEBIAN-DOCKER-NOVNC.git
- name: Build debian-novnc Base
run: docker build -t debian-novnc:base DEBIAN-DOCKER-NOVNC/Base/.
- name: Push debian-novnc Base
run: |
docker tag debian-novnc:base "${{ secrets.DOCKERHUB_USERNAME }}/debian-novnc:base"
docker push "${{ secrets.DOCKERHUB_USERNAME }}/debian-novnc:base"
build_doom_job:
needs: build_base_job
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Autenticate with Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build docker-doom image
run: docker build -t docker-doom:latest Docker/.
- name: Push docker-doom image
run: |
docker tag docker-doom:latest "${{ secrets.DOCKERHUB_USERNAME }}/docker-doom:latest"
docker push "${{ secrets.DOCKERHUB_USERNAME }}/docker-doom:latest"