Uh oh!
There was an error while loading. Please reload this page.
Added workflow to push docker image to ghcr.io - #7
Conversation
DanBrown47
left a comment
There was a problem hiding this comment.
LGTM ! Need few clarification and add test
| uses: actions/checkout@v3 | ||
| - name: Log in to the Container registry | ||
| uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 |
There was a problem hiding this comment.
What is the hash value after login-action ?
There was a problem hiding this comment.
The hash refers to specific version of docker/login-action. Here, it refers to v2. The hash can be replaced with "docker/login-action@v2" at every instance of the codes. For more reference, you can refer here.
| - name: Extract metadata (tags, labels) for Docker | ||
| id: meta | ||
| uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 |
There was a problem hiding this comment.
Is that hash value needed ?
There was a problem hiding this comment.
The "docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9" can be replaced with "docker/login-action@v2"
| IMAGE_NAME: ${{ github.repository }} | ||
| jobs: | ||
| build-and-push-image: |
There was a problem hiding this comment.
Can you add Test, as we have tested
Steps follow
- build
- test
- push to docker
On push and pull requests in the main branch, the workflow builds the docker image and pushes it to the ghcr.io registry. actor and GITHUB_TOKEN are used for authentication.