Generate-Regsync-Config #488
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
on: | |
pull_request_review: | |
types: [submitted, edited] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
if: github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'release-v2.7' | |
permissions: | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PUSH_TOKEN }} | |
# Need to remove export version once rancher/charts gets the latest version | |
# of charts-build-script binary. | |
# Test removal of regsync.yaml, commit and push before regenerating it | |
- name: Generate RegSync | |
run: | | |
echo ${{ secrets.PUSH_TOKEN }} | gh auth login --with-token | |
gh pr checkout ${{ github.event.pull_request.number }} | |
export CHARTS_BUILD_SCRIPT_VERSION=v0.4.2 | |
make pull-scripts | |
make regsync | |
- name: Commit files | |
run: | | |
git add regsync.yaml | |
git commit -m "Updating resync.yaml" | |
git branch | |
sleep 30 | |
git push | |