{"id":23067183,"url":"https://github.com/dinushchathurya/push-docker-image-to-github-container-registry-using-github-action","last_synced_at":"2025-04-03T09:14:20.408Z","repository":{"id":42128759,"uuid":"480676689","full_name":"dinushchathurya/push-docker-image-to-github-container-registry-using-github-action","owner":"dinushchathurya","description":"Automatically Publish Docker Image to GitHub Container Registry","archived":false,"fork":false,"pushed_at":"2022-04-17T13:13:23.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T10:53:06.151Z","etag":null,"topics":["dinush","dinush-chathurya","dinushchathurya","docker","ghcr","ghcr-hosted","github","github-container-registry","github-packages","publish-docker-images"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/dinushchathurya.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}},"created_at":"2022-04-12T06:09:44.000Z","updated_at":"2022-04-17T13:15:47.000Z","dependencies_parsed_at":"2022-08-12T07:20:58.212Z","dependency_job_id":null,"html_url":"https://github.com/dinushchathurya/push-docker-image-to-github-container-registry-using-github-action","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinushchathurya%2Fpush-docker-image-to-github-container-registry-using-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinushchathurya%2Fpush-docker-image-to-github-container-registry-using-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinushchathurya%2Fpush-docker-image-to-github-container-registry-using-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinushchathurya%2Fpush-docker-image-to-github-container-registry-using-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dinushchathurya","download_url":"https://codeload.github.com/dinushchathurya/push-docker-image-to-github-container-registry-using-github-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246970323,"owners_count":20862509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dinush","dinush-chathurya","dinushchathurya","docker","ghcr","ghcr-hosted","github","github-container-registry","github-packages","publish-docker-images"],"created_at":"2024-12-16T05:16:16.019Z","updated_at":"2025-04-03T09:14:20.387Z","avatar_url":"https://github.com/dinushchathurya.png","language":"JavaScript","readme":"### Publish Docker Image to GitHub Container Registry\n\n\n##### In here, the following workflow can use to publish the docker image to GitHub Container Registry (GCR) using GitHub Action. This GitHub action will be triggered every time a new Git tag is pushed to the GitHub repository.\n\n\n#### Create Environment Variables\n\n1.Create \u003ca href=\"https://docs.github.com/en/packages/guides/enabling-improved-container-support\"\u003eGitHub Personal Access Token\u003c/a\u003e in your \u003ca href=\"https://github.com/settings/tokens\"\u003eprofile developer settings\u003c/a\u003e page. Select following scopes:\u003cbr\u003e\n\n\u003cli\u003erepo\u003c/li\u003e\n\u003cli\u003eread:packages\u003c/li\u003e\n\u003cli\u003ewrite:packages\u003c/li\u003e\u003cbr\u003e\n\n2.Go to your GitHub repositorie's \u003ca href=\"https://github.com/{your_username}/{your_repository_name}/settings/secrets/actions\"\u003eSettings =\u003e Secrets =\u003e Actions\u003c/a\u003e and create New Repsitory Secret. Name it \u003cb\u003eGHCR_PAT\u003c/b\u003e and set the value to your created \u003cb\u003eYOUR ACCESS TOKEN\u003c/b\u003e.\n\n#### Publish new Docker Image with version number\n\nAs usual, stage your changes and then commit them. Then, run the folowing commands:\n\n```\ngit tag \u003cyour_tag\u003e \n```\n\nThen run the following command to push changes to GitHub repository:\n\n```\ngit push origin \u003ctag_name\u003e\n```\n\nThe following workflow is designed to be triggered when a new Git tag is pushed project repository. Using the workflow, you can perform pushes to the repository (git push) without triggering this workflow. For example, when updating the project’s README file, you can run the following command:\n\n```\ngit push \u003cbranch_name\u003e\n```\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinushchathurya%2Fpush-docker-image-to-github-container-registry-using-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdinushchathurya%2Fpush-docker-image-to-github-container-registry-using-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinushchathurya%2Fpush-docker-image-to-github-container-registry-using-github-action/lists"}