Skip to content

Automated Kolla dependency update #1

Automated Kolla dependency update

Automated Kolla dependency update #1

name: Update dependencies
on:
# Allow manual executions
workflow_dispatch:
# Run nightly
schedule:
- cron: '0 0 * * *'
jobs:
propose_github_release_updates:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- key: kolla
path: src/kayobe-config/etc/kayobe/stackhpc.yml
repository: stackhpc/kolla
version_jsonpath: stackhpc_kolla_source_version
- key: kolla-ansible
path: src/kayobe-config/etc/kayobe/stackhpc.yml
repository: stackhpc/kolla-ansible
version_jsonpath: stackhpc_kolla_ansible_source_version
- key: kayobe
path: src/kayobe-config/requirements.txt
repository: stackhpc/kayobe
name: ${{ matrix.key }}
steps:
- name: Checkout
uses: actions/checkout@v4
path: src/kayobe-config

Check failure on line 34 in .github/workflows/update-dependencies.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update-dependencies.yml

Invalid workflow file

You have an error in your yaml syntax on line 34
- 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: src/${{ matrix.key }}
- name: Get latest tag
id: latest_tag
run: |
TAG=$(git describe --tags --abbrev=0 --match stackhpc/\*)
echo latest_tag=${TAG} >> $GITHUB_OUTPUT
- 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 }}
- name: Generate app token for PR
uses: azimuth-cloud/github-actions/generate-app-token@master
id: generate-app-token
with:
repository: ${{ github.repository }}
app-id: ${{ secrets.AUTOMATION_APP_ID }}
app-private-key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }}
- name: Propose changes via PR if required
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-app-token.outputs.token }}
path: src/kayobe-config
commit-message: >-
Bump ${{ matrix.key }} to ${{ steps.next.outputs.version }}
branch: update-dependency/${{ matrix.key }}
delete-branch: true
title: >-
Bump ${{ matrix.key }} to ${{ steps.next.outputs.version }}
body: >
This PR was created automatically to update
${{ matrix.key }} to ${{ steps.next.outputs.version }}.
labels: |
stackhpc-ci