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 input variable of glueops_codespace_tag to all workflows. #211

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

Conversation

venkatamutyala
Copy link
Contributor

@venkatamutyala venkatamutyala commented Nov 25, 2024

User description

feat: add support to trigger aws, hetzner, and qemu workflows manually


PR Type

enhancement


Description

  • Added support for manually triggering AWS, Hetzner, and QEMU workflows using workflow_dispatch.
  • Introduced a new input variable glueops_codespace_tag for specifying the tag to use in workflows.
  • Updated packer build commands to utilize the new input variable, allowing for more flexible builds.

Changes walkthrough 📝

Relevant files
Enhancement
packer-aws.yml
Add manual trigger and input variable to AWS workflow       

.github/workflows/packer-aws.yml

  • Added workflow_dispatch to allow manual triggering.
  • Introduced glueops_codespace_tag input variable.
  • Modified packer build command to use the new input variable.
  • +6/-1     
    packer-hetzner.yml
    Add manual trigger and input variable to Hetzner workflow

    .github/workflows/packer-hetzner.yml

  • Added workflow_dispatch to allow manual triggering.
  • Introduced glueops_codespace_tag input variable.
  • Modified packer build commands to use the new input variable.
  • +7/-2     
    packer-qemu.yml
    Update input variable description in QEMU workflow             

    .github/workflows/packer-qemu.yml

    • Updated description for glueops_codespace_tag input variable.
    +1/-1     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    feat: add support to trigger aws, hetzner, and qemu workflows manually
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Workflow Condition
    The workflow still checks for workflow_run.conclusion success but now has workflow_dispatch trigger. Should validate if this condition needs to be adjusted for manual triggers.

    Duplicate Code
    The packer build commands for stage and prod environments are identical. Consider extracting the common command into a reusable step or composite action.

    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    General
    Add input validation to ensure version tags follow the required format

    Add pattern validation for the glueops_codespace_tag input to ensure it follows
    semantic versioning format (e.g., v0.60.0) to prevent invalid tag inputs.

    .github/workflows/packer-aws.yml [9-12]

     inputs:
       glueops_codespace_tag:
         description: 'Enter the github.com/glueops/codespaces tag to use (e.g. v0.60.0)'
         required: false
    +    pattern: '^v\d+\.\d+\.\d+$'
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Adding pattern validation for semantic versioning is crucial for preventing runtime errors caused by malformed version tags. This is especially important as the tag is used in build commands across multiple workflows.

    8

    💡 Need additional feedback ? start a PR chat

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

    Successfully merging this pull request may close these issues.

    2 participants