Automated Kolla dependencies updates #117
Workflow file for this run
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: | ||
jobs: | ||
propose_github_release_updates: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
include: | ||
- key: kolla | ||
repo_path: ${{ github.workspace }}/src/kolla | ||
path: ${{ github.workspace }}/src/kayobe-config/etc/kayobe/stackhpc.yml | ||
repository: stackhpc/kolla | ||
version_jsonpath: stackhpc_kolla_source_version | ||
- key: kolla-ansible | ||
repo_path: ${{ github.workspace }}/src/kolla-ansible | ||
path: ${{ github.workspace }}/src/kayobe-config/etc/kayobe/stackhpc.yml | ||
repository: stackhpc/kolla-ansible | ||
version_jsonpath: stackhpc_kolla_ansible_source_version | ||
- key: kayobe | ||
repo_path: ${{ github.workspace }}/src/kayobe | ||
path: ${{ github.workspace }}/src/kayobe-config/requirements.txt | ||
repository: stackhpc/kayobe | ||
name: ${{ matrix.key }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
path: ${{ github.workspace }}/src/kayobe-config | ||
- name: Determine OpenStack release | ||
id: openstack_release | ||
run: | | ||
BRANCH=$(awk -F'=' '/defaultbranch/ {print $2}' src/kayobe-config/.gitreview) | ||
echo "openstack_release=${BRANCH}" | sed -E "s,(stable|unmaintained)/,," >> $GITHUB_OUTPUT | ||
- name: Checkout the dependency repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ matrix.repository }} | ||
ref: stackhpc/${{ steps.openstack_release.outputs.openstack_release }} | ||
path: ${{ matrix.repo_path }} | ||
- name: Get latest tag | ||
id: latest_tag | ||
run: | | ||
TAG=$(git describe --tags --abbrev=0 --match stackhpc/\*) | ||
echo latest_tag=${TAG} >> $GITHUB_OUTPUT | ||
working-directory: ${{ matrix.repo_path }} | ||
- name: Update dependency key (kolla) | ||
uses: azimuth-cloud/github-actions/config-update@master | ||
with: | ||
path: ${{ matrix.path }} | ||
updates: | | ||
${{ matrix.version_jsonpath }}=${{ steps.latest_tag.outputs.latest_tag }} | ||
if: contains(matrix.key, 'kolla') | ||
- name: Update dependency key (kayobe) | ||
run: | | ||
REPLACE=$(sed -i "s/@stackhpc\/.*$/$TAG/g" $REQUIREMENTS) | ||
if: contains(matrix.key, 'kayobe') | ||
env: | ||
TAG: ${{ steps.latest_tag.outputs.latest_tag }} | ||
REQUIREMENTS: ${{ matrix.path }} |