Skip to content

Update Addons

Update Addons #651

name: Update Addons
on:
schedule:
# everyday at 1 o'clock.
- cron: '0 1 * * *'
workflow_dispatch:
inputs:
openebs_chart_version:
description: 'OpenEBS chart version for updating the chart and images'
required: false
registry_chart_version:
description: 'Registry chart version for updating the chart and images'
required: false
velero_chart_version:
description: 'Velero chart version for updating the chart and images'
required: false
seaweedfs_chart_version:
description: 'SeaweedFS chart version for updating the chart and images'
required: false
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache-dependency-path: "**/*.sum"
- name: Compile buildtools
run: |
make buildtools
- name: Upload buildtools artifact
uses: actions/upload-artifact@v5
with:
name: buildtools
path: output/bin/buildtools
update-dependencies:
runs-on: ubuntu-latest
needs:
- build
strategy:
fail-fast: false
matrix:
addon:
- openebs
- registry
- seaweedfs
- velero
- adminconsole
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download buildtools artifact
uses: actions/download-artifact@v6
with:
name: buildtools
path: output/bin
- name: Update ${{ matrix.addon }}
id: update
env:
CHARTS_REGISTRY_SERVER: registry.replicated.com
CHARTS_REGISTRY_USER: ${{ secrets.REGISTRY_USERNAME_PRODUCTION }}
CHARTS_REGISTRY_PASS: ${{ secrets.REGISTRY_PASSWORD_PRODUCTION }}
IMAGES_REGISTRY_SERVER: index.docker.io
IMAGES_REGISTRY_USER: ${{ secrets.DOCKERHUB_USER }}
IMAGES_REGISTRY_PASS: ${{ secrets.DOCKERHUB_PASSWORD }}
CHARTS_DESTINATION: registry.replicated.com/ec-charts
INPUT_OPENEBS_CHART_VERSION: ${{ github.event.inputs.openebs_chart_version }}
INPUT_REGISTRY_CHART_VERSION: ${{ github.event.inputs.registry_chart_version }}
INPUT_VELERO_CHART_VERSION: ${{ github.event.inputs.velero_chart_version }}
INPUT_SEAWEEDFS_CHART_VERSION: ${{ github.event.inputs.seaweedfs_chart_version }}
ARCHS: "amd64,arm64"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
chmod 755 ./output/bin/buildtools
./output/bin/buildtools update addon ${{ matrix.addon }}
- name: Determine target branch
id: determine-target
run: |
if [ "${{ github.ref_name }}" = "main" ]; then
target_branch="automation/update-makefile-${{ matrix.addon }}"
else
target_branch="automation/${{ github.ref_name }}/update-makefile-${{ matrix.addon }}"
fi
echo "target_branch=${target_branch}" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GH_PAT }}
commit-message: updated ${{ matrix.addon }} version
title: "feat: update ${{ matrix.addon }} version"
branch: ${{ steps.determine-target.outputs.target_branch }}
delete-branch: true
labels: |
automated-pr
type::chore
draft: false
base: ${{ github.ref_name }}
body: |
Automated changes by the [update-addons](https://github.com/replicatedhq/embedded-cluster/blob/main/.github/workflows/update-addons.yaml) GitHub action