-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add automation for docker image #63
base: main
Are you sure you want to change the base?
Conversation
Add release.config.js file to configure semantic release plugins for the 'main' branch. Include plugins for commit analysis, release notes generation, and GitHub integration. Also, add the semantic-release-docker plugin for Docker image release. Add .github/.workflows/docker-publish.yml file to define a workflow for semantic release. The workflow runs on the 'main' branch and includes steps to checkout the code, setup Node.js, install dependencies, and execute semantic release. It also sets environment variables for GitHub and Docker registry authentication.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
"@semantic-release/github", | ||
['@codedependant/semantic-release-docker', { | ||
dockerImage: 'open-resume', | ||
dockerProject: 'tiflo', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace by your docker Hub name
This looks good to me 😄 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions and thoughts on these proposed changes.
|
||
- name: Semantic Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GA_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use the default token created for the workflow and adjust the permissions assigned to it instead.
GITHUB_TOKEN: ${{ secrets.GA_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
- main | ||
|
||
jobs: | ||
Release: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest using the name
key to explicitly assign a name to the job instead.
Release: | |
release: | |
name: Release |
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }} | ||
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that these environment variables are named incorrectly,
according to the documentation for this semantic-release
plugin.
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }} | |
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They'll also need to be configured in this repository prior to merge!
|
||
jobs: | ||
Release: | ||
runs-on: ubuntu-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This token permission is set by default but could be useful to state it explicitly.
runs-on: ubuntu-latest | |
runs-on: ubuntu-latest | |
permissions: | |
content: read |
Add release.config.js file to configure semantic release plugins for the 'main' branch. Include plugins for commit analysis, release notes generation, and GitHub integration. Also, add the semantic-release-docker plugin for Docker image release.
Add .github/.workflows/docker-publish.yml file to define a workflow for semantic release. The workflow runs on the 'main' branch and includes steps to checkout the code, setup Node.js, install dependencies, and execute semantic release. It also sets environment variables for GitHub and Docker registry authentication.