named_colors 0.1.1

A Rust library that provides named colors in RGB and Hexadecimal formats.
Documentation
name: Rust CI/CD with Docker

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    # Checkout the code from the repository
    - uses: actions/checkout@v4

    # Build the Docker image
    - name: Build Docker Image
      run: docker build -t named-colors .

    # Run tests inside the Docker container
    - name: Run Tests
      run: docker run named-colors cargo test --release

    # Optional: You can push the Docker image to DockerHub or another registry
    - name: Push Docker Image to DockerHub
      if: success()  # Only if the previous steps were successful
      run: |
        echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
        docker tag named-colors ${{ secrets.DOCKER_USERNAME }}/named-colors:latest
        docker push ${{ secrets.DOCKER_USERNAME }}/named-colors:latest