Skip to content

Docker Image CI/CD

Docker Image CI/CD #10

Workflow file for this run

name: Docker Image CI/CD
on:
push:
tags:
- 'v*.*.*' # Trigger workflow on version tag pushes (e.g., v2.2.3)
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker Image
run: |
docker build -t lklynet/dashly:${{ github.ref_name }} -t lklynet/dashly:latest .
- name: Push Docker Image
run: |
docker push lklynet/dashly:${{ github.ref_name }}
docker push lklynet/dashly:latest