Skip to content

Update main.tf

Update main.tf #31

Workflow file for this run

name: Build and Push to Docker Hub
on:
push:
branches:
- main # Set to the branch name you want to trigger the build.
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }} # Your Docker Hub username.
password: ${{ secrets.DOCKERHUB_TOKEN }} # Your Docker Hub token or password.
- name: Build and Push Docker image
run: |
docker build . -t ezio22/cicddemodockerhub:latest
docker push ezio22/cicddemodockerhub:latest