Skip to content

update-sources

update-sources #521

---
name: update-sources
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
inputs:
ref:
description: Branch, tag or SHA to checkout
required: true
default: main
jobs:
update-sources:
runs-on: ubuntu-latest
strategy:
matrix:
release:
- '2023.1'
- '2023.2'
- '2024.1'
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || 'main' }}
- name: Setup Python
uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Get old config checksum
id: old_config
run: |
echo checksum=$(sha256sum releases/${{ matrix.release }}/config.yml | awk '{ print $1 }') >> $GITHUB_OUTPUT
- name: Update sources
run: |
python kolla-builder.py update-sources -i releases/${{ matrix.release }}/config.yml -o releases/${{ matrix.release }}/config.yml
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Get new config checksum
id: new_config
run: |
echo checksum=$(sha256sum releases/${{ matrix.release }}/config.yml | awk '{ print $1 }') >> $GITHUB_OUTPUT
- name: Create Pull Request
if: ${{ steps.new_config.outputs.checksum != steps.old_config.outputs.checksum }}
uses: peter-evans/create-pull-request@v7
with:
commit-message: "feat: update sources for ${{ matrix.release }}"
delete-branch: true
branch: feat/bump-sources-${{ matrix.release }}
title: "⚙️ ${{ matrix.release }}: update sources"
body: |
This is an automatic pull request