Build and deploy docker images on dockerhub #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 debian-doom image | |
run: docker build -t docker-doom:latest Docker/. | |
- name: Push debian-doom image | |
run: | | |
docker tag debian-doom:latest "${{ secrets.DOCKERHUB_USERNAME }}/docker-doom:latest" | |
docker push "${{ secrets.DOCKERHUB_USERNAME }}/docker-doom:latest" |