diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..568d2be --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,31 @@ +name: Docker Image CI/CD + +on: + push: + tags: + - 'v*.*.*' # Trigger on tags matching semantic versioning (e.g., v2.0.0) + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and Push Docker Image + uses: docker/build-push-action@v4 + with: + push: true + tags: | + lklynet/dashly:${{ github.ref_name }} + lklynet/dashly:latest \ No newline at end of file