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

Add Hadolint GitHub Actions Workflow #37

Merged
merged 3 commits into from
May 7, 2024
Merged

Add Hadolint GitHub Actions Workflow #37

merged 3 commits into from
May 7, 2024

Conversation

ucan-lab
Copy link
Owner

@ucan-lab ucan-lab commented May 7, 2024

User description

close #36


PR Type

enhancement


Description

  • GitHub ActionsワークフローにHadolintを追加し、DockerfileのLintを自動化しました。
  • dockerfileのパスをinfra/docker/**/Dockerfileとして指定し、複数のDockerfileに対応しています。
  • 不要になったMySQLコンテナの起動待機処理を削除し、ワークフローの効率を向上させました。

Changes walkthrough 📝

Relevant files
Enhancement
testing-pull-request.yaml
GitHub ActionsにHadolintワークフローを追加                                                 

.github/workflows/testing-pull-request.yaml

  • Hadolint GitHub Actionsワークフローを追加しました。
  • dockerfileのパスを指定して、DockerfileのLintを行うように設定しました。
  • MySQLコンテナの起動待機処理を削除しました。
  • +3/-3     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @github-actions github-actions bot added the chore 種別: ツールやライブラリの変更 label May 7, 2024
    Copy link

    github-actions bot commented May 7, 2024

    PR Description updated to latest commit (d6caa81)

    Copy link

    github-actions bot commented May 7, 2024

    PR Review 🔍

    ⏱️ Estimated effort to review [1-5]

    2, HadolintのGitHub Actionsワークフローを追加する変更は、比較的シンプルであり、レビューにかかる時間と労力は少ないです。変更点は明確で、主に設定ファイルの更新に関連しています。

    🧪 Relevant tests

    No

    ⚡ Possible issues

    Glob Pattern Usage: dockerfile: infra/docker/**/Dockerfileのglobパターンが意図したDockerfileを正確に指定しているか確認が必要です。特定のディレクトリ構造やファイル名に依存するため、意図しないファイルが対象になる可能性があります。

    🔒 Security concerns

    No

    Code feedback:
    relevant file.github/workflows/testing-pull-request.yaml
    suggestion      

    Hadolintアクションのバージョンを固定することを検討してください。uses: hadolint/hadolint-action@v3を使用していますが、将来的に予期しない変更が発生する可能性があります。バージョンをより具体的に指定することで、安定性を向上させることができます。 [important]

    relevant line- uses: hadolint/hadolint-action@v3

    Copy link

    github-actions bot commented May 7, 2024

    PR Code Suggestions ✨

    CategorySuggestions                                                                                                                                                       
    Best practice
    特定の Dockerfile を指定して、より確実な動作を保証します。

    dockerfile オプションでワイルドカードを使用していますが、これは特定の Dockerfile を指定するよりも不具合を引き起こす可能性があります。特定の
    Dockerfile を指定することをお勧めします。

    .github/workflows/testing-pull-request.yaml [52]

    -dockerfile: infra/docker/**/Dockerfile
    +dockerfile: infra/docker/specific-path/Dockerfile
     

    @ucan-lab ucan-lab force-pushed the chore-36-hadolint branch 2 times, most recently from 2112e86 to 9cc37e7 Compare May 7, 2024 14:12
    @ucan-lab ucan-lab merged commit 269070f into main May 7, 2024
    4 checks passed
    @ucan-lab ucan-lab deleted the chore-36-hadolint branch May 7, 2024 14:16
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    chore 種別: ツールやライブラリの変更
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    Add Hadolint GitHub Actions Workflow
    1 participant