diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 080c8b8..3074bf4 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -3,9 +3,17 @@ on: pull_request: branches: - main + paths: + - .github/workflows/lint.yaml + - .github/workflows/install.yaml + - charts/** push: branches: - main + paths: + - .github/workflows/lint.yaml + - .github/workflows/install.yaml + - charts/** jobs: lint: diff --git a/.github/workflows/publish-artifacts.yaml b/.github/workflows/publish-artifacts.yaml index 151df48..57d99fb 100644 --- a/.github/workflows/publish-artifacts.yaml +++ b/.github/workflows/publish-artifacts.yaml @@ -3,6 +3,10 @@ on: push: branches: - main + paths: + - .github/workflows/publish-artifacts.yaml + - charts/** + - utils/** jobs: build_push_utils_image: diff --git a/.github/workflows/sync-images.yaml b/.github/workflows/sync-images.yaml new file mode 100644 index 0000000..25890ce --- /dev/null +++ b/.github/workflows/sync-images.yaml @@ -0,0 +1,62 @@ +name: sync images +on: + pull_request: + branches: + - main + paths: + - .github/workflows/sync-images.yaml + - skopeo-manifests/** + push: + branches: + - main + paths: + - .github/workflows/sync-images.yaml + - skopeo-manifests/** + +jobs: + sync_images: + runs-on: ubuntu-latest + strategy: + matrix: + component: + - calico + # - ccm-openstack + # - cilium + # - cluster-autoscaler + # - csi-cinder + # - ingress-nginx + # - kube-prometheus-stack + # - kubernetes-dashboard + # - loki-stack + # - mellanox-network-operator + # - metrics-server + # - nfd + # - nvidia-gpu-operator + steps: + - name: Check out the repository + uses: actions/checkout@v3 + + - name: Install skopeo + run: sudo apt-get -y update && sudo apt-get install -y skopeo + + - name: Log in with skopeo + run: >- + echo ${{ secrets.GITHUB_TOKEN }} | + skopeo login ghcr.io -u ${{ github.actor }} --password-stdin + + - name: Check component manifest for changes + uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + manifest: + - skopeo-manifests/${{ matrix.component }}.yml + + - name: Sync component images + if: ${{ steps.changes.outputs.manifest == 'true' }} + run: >- + skopeo sync + --src yaml skopeo-manifests/${{ matrix.component }}.yml + --dest docker ghcr.io/stackhpc/capi + --scoped + --all diff --git a/skopeo-manifests/calico.yml b/skopeo-manifests/calico.yml new file mode 100644 index 0000000..ab28350 --- /dev/null +++ b/skopeo-manifests/calico.yml @@ -0,0 +1,23 @@ +docker.io: + images: + calico/apiserver: + - v3.24.5 + calico/cni: + - v3.24.5 + calico/csi: + - v3.24.5 + calico/kube-controllers: + - v3.24.5 + calico/node: + - v3.24.5 + calico/node-driver-registrar: + - v3.24.5 + calico/pod2daemon-flexvol: + - v3.24.5 + calico/typha: + - v3.24.5 + +quay.io: + images: + tigera/operator: + - v1.28.5