{"id":18378257,"url":"https://github.com/john-cd/rust_github_action","last_synced_at":"2026-03-19T04:06:07.745Z","repository":{"id":215210623,"uuid":"738326211","full_name":"john-cd/rust_github_action","owner":"john-cd","description":"A GitHub Action for Rust code","archived":false,"fork":false,"pushed_at":"2024-01-03T16:47:16.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T13:42:09.440Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/john-cd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-01-03T01:11:43.000Z","updated_at":"2024-01-03T18:33:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2431c7f-229d-4c00-9969-3eabcd232d29","html_url":"https://github.com/john-cd/rust_github_action","commit_stats":null,"previous_names":["john-cd/rust_github_action"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/john-cd/rust_github_action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-cd%2Frust_github_action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-cd%2Frust_github_action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-cd%2Frust_github_action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-cd%2Frust_github_action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/john-cd","download_url":"https://codeload.github.com/john-cd/rust_github_action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-cd%2Frust_github_action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28687438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"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":[],"created_at":"2024-11-06T00:32:33.553Z","updated_at":"2026-01-23T10:17:29.887Z","avatar_url":"https://github.com/john-cd.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker action\n\nThis action builds Rust code, builds a thin Docker container with the resulting executable, then saves the image as `\u003coutput-file-name\u003e.tar.zip`.\n\n## Inputs\n\n- app-name: App name (from Cargo.toml)\n- output-file-name: Name of the output file (without extension)\n\nRefer to `action.yaml` for details.\n\nThe action assumes the presence of `Cargo.toml`, `Cargo.lock` and a `src` folder contains Rust code.\n\n## Outputs\n\n- output_file_path: output file path\n\nRefer to `action.yaml` for details.\n\n## Example usage\n\n```yaml\nsteps:\n  - uses: john-cd/rust_github_action@v1\n```\n\nAn example workflow is found in `./test_workflow/`.\n\n## Testing the Docker image locally\n\nThe Dockerfile is a multi-stage build.\n\nTo build the \"build\" Docker image, which contains the Rust tooling, use the following from the root directory:\n\n```bash\ndocker build --tag test_app --target build \\\n  --build-arg RUST_VERSION=1.75 --build-arg APP_NAME=test_app \\\n  --platform linux/amd64 --file ./Dockerfile   ./test_app\n```\n\nSubstitute `--target final` to build the \"final\" stage, which only contains the final executable.\n\nRun the Docker image and exec into it to inspect it.\n\n```bash\ndocker run -d --name test_container test_app\ndocker exec -it test_container ash\n\n# or simply\ndocker run -it --name test_container test_app ash\n```\n\n## Create a new version of the GitHub Action\n\nCreate a tag, push it to the remote origin. The tag will be used by GitHub Action as the Action version.\nThen update the version in your workflows e.g. `john-cd/rust_github_action@v2`\n\n```bash\n# List existing tags\ngit tag\n# Create local tag\ngit tag -a -m \"Description of this release\" v2\ngit tag\n# Show details about the tag\ngit show v2\n# Push tag to remote\ngit push origin v2\n# git push --follow-tags\n```\n\n[Git Basics - Tagging]( https://git-scm.com/book/en/v2/Git-Basics-Tagging )\n\n## Docker Compose config\n\n`Docker Compose` configuration is also provided, but it is not used by the GitHub Action itself.\n\n`compose.yaml` uses the `build` stage.\n\nTo build the Docker image using Compose, use\n\n```bash\ndocker compose build\n```\n\nTo test the build stage with the provided `test_app`, use\n\n```bash\ndocker compose -f compose.yaml -f compose-test.yaml build\n```\n\nTo build and run the `final` Docker image using Compose, use `compose-final.yaml`:\n\n```bash\ndocker compose -f compose.yaml -f compose-final.yaml build\ndocker compose -f compose.yaml -f compose-final.yaml up -d\n\n# or simply\ndocker compose -f compose.yaml -f compose-final.yaml up -d --build\n```\n\nTo test the final stage with the provided `test_app`, use\n\n```bash\ndocker compose -f compose.yaml -f compose-final.yaml -f compose-test.yaml up -d --build\n```\n\n## References\n\n* [Creating a composite action](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action)\n* [Creating a Docker container action](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action)\n* [Docker's Rust guide](https://docs.docker.com/language/rust/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohn-cd%2Frust_github_action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohn-cd%2Frust_github_action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohn-cd%2Frust_github_action/lists"}