Skip to content

Update dependencies #555

Update dependencies

Update dependencies #555

name: Update dependencies
on:
# Allow manual executions
workflow_dispatch:
# Run nightly
schedule:
- cron: '0 0 * * *'
jobs:
propose_update_pr:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- key: addon-provider
type: helm
repo_url: https://azimuth-cloud.github.io/cluster-api-addon-provider
chart_name: cluster-api-addon-provider
- key: azimuth-images
type: github
repo: azimuth-cloud/azimuth-images
- key: cluster-api
type: github
repo: kubernetes-sigs/cluster-api
- key: cluster-api-janitor-openstack
type: helm
repo_url: https://azimuth-cloud.github.io/cluster-api-janitor-openstack
chart_name: cluster-api-janitor-openstack
- key: cluster-api-provider-openstack
type: github
repo: kubernetes-sigs/cluster-api-provider-openstack
- key: cert-manager
type: helm
repo_url: https://charts.jetstack.io
chart_name: cert-manager
- key: helm
type: github
repo: helm/helm
- key: sonobuoy
type: github
repo: vmware-tanzu/sonobuoy
name: ${{ matrix.key }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check for updates (Helm)
id: helm-version
uses: azimuth-cloud/github-actions/helm-latest-version@master
with:
repository: ${{ matrix.repo_url }}
chart: ${{ matrix.chart_name }}
if: ${{ matrix.type == 'helm' }}
- name: Check for updates (GitHub)
id: github-version
uses: azimuth-cloud/github-actions/github-latest-release@master
with:
repository: ${{ matrix.repo }}
if: ${{ matrix.type == 'github' }}
- name: Get next version from relevant outputs
id: next
run: >-
echo "version=$NEXT_VERSION" >> "$GITHUB_OUTPUT"
env:
NEXT_VERSION: >-
${{
matrix.type == 'helm' &&
steps.helm-version.outputs.version ||
steps.github-version.outputs.version
}}
- name: Update dependency key
uses: azimuth-cloud/github-actions/config-update@master
with:
path: ./dependencies.json
updates: |
${{ matrix.key }}=${{ steps.next.outputs.version }}
- name: Generate app token for PR
uses: azimuth-cloud/github-actions/generate-app-token@master
id: generate-app-token
with:
repository: ${{ github.repository }}
app-id: ${{ secrets.AUTOMATION_APP_ID }}
app-private-key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }}
- name: Propose changes via PR if required
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-app-token.outputs.token }}
commit-message: >-
Update ${{ matrix.key }} to ${{ steps.next.outputs.version }}
branch: update-dependency/${{ matrix.key }}
delete-branch: true
title: >-
Update ${{ matrix.key }} to ${{ steps.next.outputs.version }}
body: >
This PR was created automatically to update
${{ matrix.key }} to ${{ steps.next.outputs.version }}.
labels: |
automation
dependency-update