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

Automate updates of existing helm charts #983

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 0 additions & 71 deletions .github/workflows/daily.yaml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release Partner Charts

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Configure git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Update main-source branch
run: |
scripts/pull-ci-scripts
bin/partner-charts-ci auto
adamkpickering marked this conversation as resolved.
Show resolved Hide resolved
git push origin main-source
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of pushing directly to the branches, wouldn't it be better to create PRs for each individual change, with auto-merge enabled?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What do you mean by "each individual change"? Are you suggesting that this automation should create a PR that is merged automatically every time it runs? If so, I can't think of a benefit to doing this - can you please elaborate?

If this isn't what you meant, can you clarify?

Copy link
Collaborator

Choose a reason for hiding this comment

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

By creating a PR (even with auto merge enabled), it forces an execution of the CI scripts to validate the change. Currently, this executes partner-charts-ci validate (see .github/workflows/pull-request.yml). If something went wrong, we would have the ability to stop the change from getting merged.


- name: Update main branch
run: |
# checkout action only fetches main-source, so we need to fetch main branch also
git fetch origin main --depth 1
git checkout main
git checkout main-source -- index.yaml assets
Copy link
Collaborator

Choose a reason for hiding this comment

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

The original action also removes the assets folder and the index.yaml file before executing the checkout. Have you tested that it works?

Copy link
Collaborator Author

@adamkpickering adamkpickering Mar 8, 2024

Choose a reason for hiding this comment

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

I think I should have left that in. I'll add it back, if it fits with creating an auto-merged PR that is.

git commit -m "Release partner charts"
git push origin main
Loading