Skip to content

ci: build head docker images on changes in main #2785

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

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

Conversation

sydorovdmytro
Copy link

Add Docker build step for main branch commits

  • Automatically builds a Docker image on every commit to the main branch.
  • Tags each Docker image with head-<architecture>, e.g., vcluster-oss:head-arm64v8 or vcluster-oss:head-amd64.

What issue type does this pull request address? (keep at least one, remove the others)
/kind enhancement

What does this pull request do? Which issues does it resolve? (use resolves #<issue_number> if possible)
References OPS-148

@sydorovdmytro sydorovdmytro requested a review from Piotr1215 May 13, 2025 10:40
@sydorovdmytro sydorovdmytro requested a review from a team as a code owner May 13, 2025 10:40
@sydorovdmytro sydorovdmytro added kind/enhancement area/ci CI - Continuous Integration (GitHub Actions) labels May 13, 2025
Copy link
Contributor

@Piotr1215 Piotr1215 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use default branch variable here ${{ github.event.repository.default_branch }}

@sydorovdmytro sydorovdmytro marked this pull request as draft May 13, 2025 14:19
@sydorovdmytro sydorovdmytro force-pushed the OPS-148/ci_push_head_images branch from 87aa8ec to b4dd4d7 Compare May 16, 2025 13:08
@sydorovdmytro sydorovdmytro marked this pull request as ready for review May 16, 2025 13:14
@sydorovdmytro sydorovdmytro requested a review from Piotr1215 May 16, 2025 13:14
Copy link
Contributor

@Piotr1215 Piotr1215 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments and suggestions. Also we should at least run unit and helm tests before triggering the workflow, something like in the release workflow:

- name: Execute unit tests
  run: ./hack/test.sh

- name: Run Helm Unit Tests
  run: |
    helm plugin install https://github.com/helm-unittest/helm-unittest --version v0.4.4
    helm unittest chart

@sydorovdmytro
Copy link
Author

Good idea! Added unit tests and addressed other comments

Builds docker images with `head-<architecture>` tags on every push to main.
Pushes images only if executed on the main branch.
@sydorovdmytro sydorovdmytro force-pushed the OPS-148/ci_push_head_images branch from 405d1fa to c78220a Compare May 19, 2025 08:05
@sydorovdmytro sydorovdmytro requested a review from Piotr1215 May 19, 2025 08:16
@Piotr1215 Piotr1215 requested a review from jjaferson May 19, 2025 08:17
@Piotr1215 Piotr1215 requested a review from cbron May 20, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci CI - Continuous Integration (GitHub Actions) kind/enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants