Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Tifloz
Copy link

@Tifloz Tifloz commented Sep 19, 2023

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.

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.
@vercel
Copy link

vercel bot commented Sep 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
open-resume ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2023 2:26pm

"@semantic-release/github",
['@codedependant/semantic-release-docker', {
dockerImage: 'open-resume',
dockerProject: 'tiflo',
Copy link
Author

@Tifloz Tifloz Sep 19, 2023

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

@h3ct0rjs
Copy link

This looks good to me 😄 .

Copy link

@sgerrand sgerrand left a 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 }}

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.

Suggested change
GITHUB_TOKEN: ${{ secrets.GA_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- main

jobs:
Release:

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.

Suggested change
Release:
release:
name: Release

Comment on lines +33 to +34
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}

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.

Suggested change
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

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

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.

Suggested change
runs-on: ubuntu-latest
runs-on: ubuntu-latest
permissions:
content: read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants