Skip to content

Updated flow.

Updated flow. #8

name: Build and Push Docker Image (Dev)
on:
push:
branches:
- dev # Adjust this to your preferred branch
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Login to Docker
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Step 3: Build and Push Docker image (Docker CLI is pre-installed in GitHub-hosted runners)
- name: Build and Push Docker Image
run: |
# Build the Docker image
docker build -t ${{ vars.DOCKERHUB_USERNAME }}/littlelink:dev .
# Push the Docker image to Docker Hub
docker push ${{ vars.DOCKERHUB_USERNAME }}/littlelink:dev