Skip to content

Automated Kolla dependencies updates #117

Automated Kolla dependencies updates

Automated Kolla dependencies updates #117

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

Check failure on line 33 in .github/workflows/package-build-ofed.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/package-build-ofed.yml

Invalid workflow file

You have an error in your yaml syntax on line 33
- 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 }}