Skip to content

Commit

Permalink
Updated flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
davisdre committed Sep 11, 2024
1 parent 7b4f43d commit 4da1530
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions .github/workflows/docker-image-dev.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
name: Docker image (dev)
name: Build and Push Docker Image (Dev)

on:
push:
branches:
- "dev"
- dev # Adjust this to your preferred branch

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

-
name: Login to Docker Hub
# 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 }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ vars.DOCKERHUB_USERNAME }}/littlelink:dev

# 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

0 comments on commit 4da1530

Please sign in to comment.