name: Update Helm Chart on: workflow_dispatch: schedule: - cron: '00 12 * * *' jobs: update-helm: name: update helm chart runs-on: ubuntu-latest if: github.repository == 'nextcloud/all-in-one' steps: - name: Checkout code uses: actions/checkout@v4 - name: update helm chart run: | set -x GHCR_TOKEN="$(curl https://ghcr.io/token?scope=repository:nextcloud-releases/nce-php-fpm-mgmt:pull | jq '.token' | sed 's|"||g')" DOCKER_TAG="$(curl -H "Authorization: Bearer ${GHCR_TOKEN}" -L -s 'https://ghcr.io/v2/nextcloud-releases/all-in-one/tags/list?page_size=1024' | jq '.tags' | sed 's|"||g;s|[[:space:]]||g;s|,||g' | grep '^20[0-9_]\+' | grep -v latest | sort -r | head -1)" export DOCKER_TAG set +x if [ -n "$DOCKER_TAG" ] && ! grep -q "aio-nextcloud:$DOCKER_TAG" ./nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml; then sudo bash nextcloud-aio-helm-chart/update-helm.sh "$DOCKER_TAG" fi - name: Create Pull Request uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 with: commit-message: Helm Chart updates signoff: true title: Helm Chart updates body: Automated Helm Chart updates for the yaml files. It can be merged if it looks good at any time which will automatically trigger a new release of the helm chart. labels: dependencies, 3. to review milestone: next branch: aio-helm-update token: ${{ secrets.GITHUB_TOKEN }}