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

Update regsync Github action to commit the regsync file #2823

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Changes from all 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
21 changes: 16 additions & 5 deletions .github/workflows/regsync-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generate-Regsync-Config action will checkout release-v2.7 branch, run make regsync target and
# creates a pull request from rancherbot/charts or rancher/charts release-v2.7 branch with any image additions
# to regsync config file. This action is triggered whenever something is pushed into release-v2.7 branch.
# Generate-Regsync-Config action will run for every PR into release-v2.7 branch only after an approval is given
# It will run make target to generate regsync file and add a commit to the PR updating the regsync file.
# It will then install and run regsync client and do the prime image mirroring.

name: Generate-Regsync-Config

Expand All @@ -14,11 +14,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Generate Regsync Config

# Need to remove export version once rancher/charts gets the latest version
# of charts-build-script binary.
- name: Generate RegSync & Commit
run: |
gh pr checkout ${{ github.event.pull_request.number }}
export CHARTS_BUILD_SCRIPT_VERSION=v0.4.2
make pull-scripts
make regsync
git add regsync.yaml
git config --global user.name "Github Action RegSync"
git config --global user.email "github@action.com"
git commit -m "Updating regsync.yaml"
git push
rohitsakala marked this conversation as resolved.
Show resolved Hide resolved
env:
GH_TOKEN: ${{ github.token }}

- name: Install Regsync
run: |
Expand Down
Loading