{"id":25948785,"url":"https://github.com/ranjithdb/gh-actions-docker-02","last_synced_at":"2026-04-13T17:33:37.626Z","repository":{"id":280308273,"uuid":"941559501","full_name":"ranjithdb/gh-actions-docker-02","owner":"ranjithdb","description":"Building and deploying Docker image using GitHub Actions and Docker Hub","archived":false,"fork":false,"pushed_at":"2025-03-02T16:57:25.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T15:02:25.617Z","etag":null,"topics":["ci","docker","dockerhub","github-actions","nginx"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ranjithdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-02T15:27:51.000Z","updated_at":"2025-03-02T17:05:03.000Z","dependencies_parsed_at":"2025-03-02T17:23:16.484Z","dependency_job_id":null,"html_url":"https://github.com/ranjithdb/gh-actions-docker-02","commit_stats":null,"previous_names":["ranjithdb/gh-actions-docker-02"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ranjithdb/gh-actions-docker-02","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjithdb%2Fgh-actions-docker-02","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjithdb%2Fgh-actions-docker-02/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjithdb%2Fgh-actions-docker-02/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjithdb%2Fgh-actions-docker-02/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ranjithdb","download_url":"https://codeload.github.com/ranjithdb/gh-actions-docker-02/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjithdb%2Fgh-actions-docker-02/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31762586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","docker","dockerhub","github-actions","nginx"],"created_at":"2025-03-04T11:22:33.105Z","updated_at":"2026-04-13T17:33:37.609Z","avatar_url":"https://github.com/ranjithdb.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gh-actions-docker-02\n\n## Dockerized Nginx with GitHub Actions\n\nThis project automates the building and deployment of an **Nginx Docker image** using **GitHub Actions** and **Docker Hub**. The workflow is triggered whenever a new **Git tag** is pushed, ensuring semantic versioning and proper image management.\n\n## How It Works\n\n1. **Code Changes**: Developers make changes to the project and commit them.\n2. **Version Tagging**: A new version tag is created and pushed to GitHub.\n3. **GitHub Actions Workflow**:\n   - Builds the Docker image.\n   - Tags the image using the version tag and `latest`.\n   - Logs into Docker Hub using GitHub Secrets.\n   - Pushes the tagged image to Docker Hub.\n4. **Deployment**: The latest Docker image can be pulled and deployed from Docker Hub.\n\n## Prerequisites\n\n- A **Docker Hub account** with an existing repository.\n- **GitHub repository** configured with GitHub Actions.\n- **GitHub Secrets** set up:\n  - `DOCKERHUB_USERNAME`: Your Docker Hub username.\n  - `DOCKERHUB_TOKEN`: A Docker Hub Access Token (not password).\n\n## Git Tagging and Pushing\n\nTo release a new version:\n\n1. **Create a new Git tag** (replace `v1.0.0` with your version):\n\n   ```sh\n   git tag v1.0.0\n   ```\n\n2. **Push the tag to GitHub**:\n\n   ```sh\n   git push origin v1.0.0\n   ```\n\nThis will trigger the **GitHub Actions workflow** to build and push the Docker image to Docker Hub.\n\n## Pulling the Docker Image\n\nOnce the image is pushed, you can pull and run it using:\n\n```sh\ndocker pull \u003cdockerhub-username\u003e/\u003cnginx-docker\u003e:v1.0.0\n```\n\nTo run the container:\n\n```sh\ndocker run -d -p 80:80 \u003cdockerhub-username\u003e/nginx-docker:v1.0.0\n```\n\n## To pull my Docker Image\n\n```sh\ndocker pull ranjithdbas/gh-actions-docker-02:latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjithdb%2Fgh-actions-docker-02","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franjithdb%2Fgh-actions-docker-02","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjithdb%2Fgh-actions-docker-02/lists"}