Skip to content

Generate-Regsync-Config #141

Generate-Regsync-Config

Generate-Regsync-Config #141

Workflow file for this run

# 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.
name: Generate-Regsync-Config
on:
pull_request_review:
types: [submitted, edited]
jobs:
build:
if: github.event.pull_request.base.ref == 'release-v2.7'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Need to remove export version once rancher/charts gets the latest version
# of charts-build-script binary.
- name: Generate Regsync Config
run: |
export CHARTS_BUILD_SCRIPT_VERSION=v0.4.2
make pull-scripts
make regsync
- name: Commit
run: |
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 branch
git status
echo $BRANCH_NAME
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
- name: Install Regsync
run: |
curl --silent --fail --location --output regsync https://github.com/regclient/regclient/releases/download/v0.4.8/regsync-linux-amd64
chmod +x regsync
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Sync Images to Registry
run: |
head regsync.yaml
time ./regsync once --config regsync.yaml
env:
REGISTRY_ENDPOINT: ${{ secrets.REGISTRY_ENDPOINT }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}