Skip to content

Build and deploy docker images on dockerhub #2

Build and deploy docker images on dockerhub

Build and deploy docker images on dockerhub #2

name: Build and Deploy
run-name: Build and deploy docker images on dockerhub
on: [push]
jobs:
build_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 alpine-doom image
run: docker build -t alpine-doom:latest Docker/.
- name: Push alpine-doom image
run: |
docker tag alpine-doom:latest "${{ secrets.DOCKERHUB_USERNAME }}/alpine-doom:latest"
docker push "${{ secrets.DOCKERHUB_USERNAME }}/alpine-doom:latest"