Update dependencies #28
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
name: Update dependencies | |
on: | |
# Allow manual executions | |
workflow_dispatch: | |
# Run nightly | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
propose_update_pr: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- component: azimuth | |
type: helm | |
path: ./roles/azimuth/defaults/main.yml | |
repo_variable: azimuth_chart_repo | |
chart_variable: azimuth_chart_name | |
version_variable: azimuth_chart_version | |
# For now, use builds for main | |
# TODO(mkjpryor) Remove this constraint to use stable versions only | |
constraints: ">=0.1.0-dev.0.main.0,<0.1.0-dev.0.main.999999999" | |
- component: azimuth-caas-operator | |
type: helm | |
path: ./roles/azimuth_caas_operator/defaults/main.yml | |
repo_variable: azimuth_caas_operator_chart_repo | |
chart_variable: azimuth_caas_operator_chart_name | |
version_variable: azimuth_caas_operator_chart_version | |
# For now, use builds for main | |
# TODO(mkjpryor) Remove this constraint to use stable versions only | |
constraints: ">=0.2.3-dev.0.main.0,<0.2.3-dev.0.main.999999999" | |
- component: azimuth-capi-operator | |
type: helm | |
path: ./roles/azimuth_capi_operator/defaults/main.yml | |
repo_variable: azimuth_capi_operator_chart_repo | |
chart_variable: azimuth_capi_operator_chart_name | |
version_variable: azimuth_capi_operator_chart_version | |
# For now, use builds for main | |
# TODO(mkjpryor) Remove this constraint to use stable versions only | |
constraints: ">=0.1.0-dev.0.main.0,<0.1.0-dev.0.main.999999999" | |
- component: azimuth-identity-operator | |
type: helm | |
path: ./roles/azimuth_identity_operator/defaults/main.yml | |
repo_variable: azimuth_identity_operator_chart_repo | |
chart_variable: azimuth_identity_operator_chart_name | |
version_variable: azimuth_identity_operator_chart_version | |
# For now, use builds for main | |
# TODO(mkjpryor) Remove this constraint to use stable versions only | |
constraints: ">=0.1.0-dev.0.main.0,<0.1.0-dev.0.main.999999999" | |
- component: azimuth-images | |
type: github | |
path: ./roles/community_images/defaults/main.yml | |
repo_variable: community_images_azimuth_images_repo | |
version_variable: community_images_azimuth_images_version | |
- component: capi-helm-openstack-cluster | |
type: helm | |
path: ./roles/capi_cluster/defaults/main.yml | |
repo_variable: capi_cluster_chart_repo | |
chart_variable: capi_cluster_chart_name | |
version_variable: capi_cluster_chart_version | |
# For now, use builds for main | |
# TODO(mkjpryor) Remove this constraint to use stable versions only | |
constraints: ">=0.1.2-dev.0.main.0,<0.1.2-dev.0.main.999999999" | |
- component: cert-manager | |
type: helm | |
path: ./roles/certmanager/defaults/main.yml | |
repo_variable: certmanager_chart_repo | |
chart_variable: certmanager_chart_name | |
version_variable: certmanager_chart_version | |
- component: cloud-metrics-grafana | |
type: helm | |
path: ./roles/cloud_metrics/defaults/main.yml | |
repo_variable: cloud_metrics_grafana_chart_repo | |
chart_variable: cloud_metrics_grafana_chart_name | |
version_variable: cloud_metrics_grafana_chart_version | |
- component: cluster-api | |
type: github | |
path: ./roles/clusterapi/defaults/main.yml | |
repo_variable: clusterapi_core_repo | |
version_variable: clusterapi_core_version | |
- component: cluster-api-provider-openstack | |
type: github | |
path: ./roles/clusterapi/defaults/main.yml | |
repo_variable: clusterapi_openstack_repo | |
version_variable: clusterapi_openstack_version | |
- component: cluster-api-addon-provider | |
type: helm | |
path: ./roles/clusterapi/defaults/main.yml | |
repo_variable: clusterapi_addon_provider_chart_repo | |
chart_variable: clusterapi_addon_provider_chart_name | |
version_variable: clusterapi_addon_provider_chart_version | |
- component: cluster-api-janitor-openstack | |
type: helm | |
path: ./roles/clusterapi/defaults/main.yml | |
repo_variable: clusterapi_janitor_openstack_chart_repo | |
chart_variable: clusterapi_janitor_openstack_chart_name | |
version_variable: clusterapi_janitor_openstack_chart_version | |
# For now, use builds for main | |
# TODO(mkjpryor) Remove this constraint to use stable versions only | |
constraints: ">=0.1.0-dev.0.main.0,<0.1.0-dev.0.main.999999999" | |
- component: consul | |
type: helm | |
path: ./roles/consul/defaults/main.yml | |
repo_variable: consul_chart_repo | |
chart_variable: consul_chart_name | |
version_variable: consul_chart_version | |
- component: harbor | |
type: helm | |
path: ./roles/harbor/defaults/main.yml | |
repo_variable: harbor_chart_repo | |
chart_variable: harbor_chart_name | |
version_variable: harbor_chart_version | |
- component: helm | |
type: github | |
path: ./roles/helm/defaults/main.yml | |
repo_variable: helm_repo | |
version_variable: helm_version | |
- component: ingress-nginx | |
type: helm | |
path: ./roles/ingress_nginx/defaults/main.yml | |
repo_variable: ingress_nginx_chart_repo | |
chart_variable: ingress_nginx_chart_name | |
version_variable: ingress_nginx_chart_version | |
- component: k3s | |
type: github | |
path: ./roles/k3s/defaults/main.yml | |
repo_variable: k3s_repo | |
version_variable: k3s_version | |
- component: kube-prometheus-stack | |
type: helm | |
path: ./roles/kube_prometheus_stack/defaults/main.yml | |
repo_variable: kube_prometheus_stack_chart_repo | |
chart_variable: kube_prometheus_stack_chart_name | |
version_variable: kube_prometheus_stack_chart_version | |
- component: kustomize | |
type: github | |
path: ./roles/kustomize/defaults/main.yml | |
repo_variable: kustomize_repo | |
version_variable: kustomize_version | |
- component: zenith | |
type: helm | |
path: ./roles/zenith/defaults/main.yml | |
repo_variable: zenith_chart_repo | |
chart_variable: zenith_chart_name | |
version_variable: zenith_chart_version | |
# For now, use builds for main | |
# TODO(mkjpryor) Remove this constraint to use stable versions only | |
constraints: ">=0.1.0-dev.0.main.0,<0.1.0-dev.0.main.999999999" | |
name: ${{ matrix.component }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install script dependencies | |
run: pip install -r .github/scripts/requirements.txt | |
- name: Check for updates (Helm) | |
id: helm-update-version | |
run: | | |
.github/scripts/helm-update-version \ | |
${{ matrix.path }} \ | |
${{ matrix.repo_variable }} \ | |
${{ matrix.chart_variable }} \ | |
${{ matrix.version_variable }} \ | |
'${{ matrix.constraints || '>=0.0.0' }}' | |
if: ${{ matrix.type == 'helm' }} | |
- name: Check for updates (GitHub) | |
id: github-update-version | |
run: | | |
.github/scripts/github-update-version \ | |
${{ matrix.path }} \ | |
${{ matrix.repo_variable }} \ | |
${{ matrix.version_variable }} | |
if: ${{ matrix.type == 'github' }} | |
- name: Get next version from update | |
id: next | |
run: >- | |
echo "version=$NEXT_VERSION" >> "$GITHUB_OUTPUT" | |
env: | |
NEXT_VERSION: >- | |
${{ | |
matrix.type == 'helm' && | |
steps.helm-update-version.outputs.next-version || | |
steps.github-update-version.outputs.next-version | |
}} | |
- name: Generate app token for PR | |
uses: stackhpc/github-actions/generate-app-token@master | |
id: generate-app-token | |
with: | |
repository: ${{ github.repository }} | |
app-id: ${{ secrets.APP_ID }} | |
app-private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Propose changes via PR if required | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ steps.generate-app-token.outputs.token }} | |
commit-message: >- | |
Update ${{ matrix.component }} to ${{ steps.next.outputs.version }} | |
branch: update/${{ matrix.component }} | |
delete-branch: true | |
title: >- | |
Update ${{ matrix.component }} to ${{ steps.next.outputs.version }} | |
body: > | |
This PR was created automatically to update | |
${{ matrix.component }} to ${{ steps.next.outputs.version }}. | |
labels: | | |
automation | |
dependency-update |