Skip to content

Commit

Permalink
chore: Auto sync crds (#1487)
Browse files Browse the repository at this point in the history
* chore: update sync to update CRDs

* Tidy all syncs to same workflow file
  • Loading branch information
ciarams87 committed Mar 30, 2021
1 parent b383a52 commit 3861a5a
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 42 deletions.
17 changes: 17 additions & 0 deletions .github/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
nginxinc/nginx-ingress-operator:
- source: deployments/common/crds/appprotect.f5.com_aplogconfs.yaml
dest: build/kic_crds/appprotect.f5.com_aplogconfs.yaml
- source: deployments/common/crds/appprotect.f5.com_appolicies.yaml
dest: build/kic_crds/appprotect.f5.com_appolicies.yaml
- source: deployments/common/crds/appprotect.f5.com_apusersigs.yaml
dest: build/kic_crds/appprotect.f5.com_apusersigs.yaml
- source: deployments/common/crds/k8s.nginx.org_globalconfigurations.yaml
dest: build/kic_crds/k8s.nginx.org_globalconfigurations.yaml
- source: deployments/common/crds/k8s.nginx.org_policies.yaml
dest: build/kic_crds/k8s.nginx.org_policies.yaml
- source: deployments/common/crds/k8s.nginx.org_transportservers.yaml
dest: build/kic_crds/k8s.nginx.org_transportservers.yaml
- source: deployments/common/crds/k8s.nginx.org_virtualserverroutes.yaml
dest: build/kic_crds/k8s.nginx.org_virtualserverroutes.yaml
- source: deployments/common/crds/k8s.nginx.org_virtualservers.yaml
dest: build/kic_crds/k8s.nginx.org_virtualservers.yaml
31 changes: 0 additions & 31 deletions .github/workflows/sync-labels.yml

This file was deleted.

55 changes: 44 additions & 11 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,56 @@ on:
push:
branches:
- master
schedule:
- cron: '0 */12 * * *'

env:
IC_SOURCE_REPO_URL: https://github.com/nginxinc/kubernetes-ingress.git
IC_SOURCE_BRANCH: master
IC_DEST_BRANCH: master

jobs:
# This job sync this repo to our internal repo
repo-sync:
runs-on: ubuntu-20.04
steps:
- name: repo-sync
- name: Repo Sync
uses: wei/git-sync@v3
with:
source_repo: ${{ env.IC_SOURCE_REPO_URL }}
source_branch: ${{ env.IC_SOURCE_BRANCH }}
source_repo: "nginxinc/kubernetes-ingress"
source_branch: "master"
destination_repo: ${{ secrets.SYNC_DEST_REPO_URL }}
destination_branch: ${{ env.IC_DEST_BRANCH }}
destination_branch: "master"
ssh_private_key: ${{ secrets.SYNC_SSH_PRIVATE_KEY }}

# This job open a PR to sync the generated CRD files across to nginx-ingress-operator
# (see .github/sync.yml for config details)
crds-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Run CRD File Sync
uses: BetaHuhn/repo-file-sync-action@v1
with:
GH_PAT: ${{ secrets.NGINX_PAT }}
ASSIGNEES: "nginxinc/kic"
PR_LABELS: chore
COMMIT_EACH_FILE: false

# This job sync the labels across the various repos
labels-sync:
strategy:
# don't break another job if one is failed
fail-fast: false
matrix:
repo:
- nginxinc/kubernetes-ingress
- nginxinc/nginx-ingress-operator
- nginxinc/nginx-prometheus-exporter
- nginxinc/nginx-plus-go-client
- nginxinc/nginx-asg-sync
- nginxinc/nginx-ns1-gslb
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Sync Labels
uses: micnncim/action-label-syncer@v1.2.0
with:
repository: ${{ matrix.repo }}
token: ${{ secrets.NGINX_PAT }}
prune: true

0 comments on commit 3861a5a

Please sign in to comment.