Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dinushchathurya/push-docker-image-to-github-container-registry-using-github-action
Automatically Publish Docker Image to GitHub Container Registry
https://github.com/dinushchathurya/push-docker-image-to-github-container-registry-using-github-action
dinush dinush-chathurya dinushchathurya docker ghcr ghcr-hosted github github-container-registry github-packages publish-docker-images
Last synced: 18 days ago
JSON representation
Automatically Publish Docker Image to GitHub Container Registry
- Host: GitHub
- URL: https://github.com/dinushchathurya/push-docker-image-to-github-container-registry-using-github-action
- Owner: dinushchathurya
- Created: 2022-04-12T06:09:44.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-04-17T13:13:23.000Z (over 2 years ago)
- Last Synced: 2024-12-14T20:45:43.122Z (19 days ago)
- Topics: dinush, dinush-chathurya, dinushchathurya, docker, ghcr, ghcr-hosted, github, github-container-registry, github-packages, publish-docker-images
- Language: JavaScript
- Homepage:
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Publish Docker Image to GitHub Container Registry
##### 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.
#### Create Environment Variables
1.Create GitHub Personal Access Token in your profile developer settings page. Select following scopes:
2.Go to your GitHub repositorie's Settings => Secrets => Actions and create New Repsitory Secret. Name it GHCR_PAT and set the value to your created YOUR ACCESS TOKEN.
#### Publish new Docker Image with version number
As usual, stage your changes and then commit them. Then, run the folowing commands:
```
git tag
```
Then run the following command to push changes to GitHub repository:
```
git push origin
```
The 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:
```
git push
```