Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Build and push Docker image to dockerhub
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Login to dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_SECERT }}
- name: Build and push to dockerhub
uses: docker/build-push-action@v5
with:
context:
push: true
tags: hydro2070/complier:latest