diff --git a/.github/workflows/stackhpc-update-kolla.yml b/.github/workflows/stackhpc-update-kolla.yml new file mode 100644 index 000000000..016cbe7a5 --- /dev/null +++ b/.github/workflows/stackhpc-update-kolla.yml @@ -0,0 +1,23 @@ +name: Update Kolla versions + +on: + # Allow manual executions + workflow_dispatch: + # Run nightly + schedule: + - cron: '0 0 * * *' + +jobs: + update-from-branch: + name: Update dependencies + strategy: + matrix: + include: + - version: stackhpc/2023.1 + - version: stackhpc/2024.1 + uses: ./.github/workflows/update-dependencies.yml + with: + openstack_version: ${{ matrix.version }} + permissions: + contents: write + pull-requests: write diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 2b9c8bda7..0bff4fcc9 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -1,11 +1,12 @@ name: Update dependencies on: - # Allow manual executions - workflow_dispatch: - # Run nightly - schedule: - - cron: '0 0 * * *' + workflow_call: + inputs: + openstack_version: + description: OpenStack version + type: string + required: true jobs: propose_github_release_updates: @@ -38,20 +39,14 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: + ref: ${{ inputs.openstack_version }} path: ${{ github.workspace }}/src/kayobe-config - - name: Determine OpenStack release - id: openstack_release - run: | - BRANCH=$(awk -F'=' '/defaultbranch/ {print $2}' .gitreview) - echo "openstack_release=${BRANCH}" | sed -E "s,(stable|unmaintained)/,," >> $GITHUB_OUTPUT - working-directory: ${{ github.workspace }}/src/kayobe-config - - name: Checkout the dependency repo uses: actions/checkout@v4 with: repository: ${{ matrix.repository }} - ref: stackhpc/${{ steps.openstack_release.outputs.openstack_release }} + ref: ${{ inputs.openstack_version }} fetch-tags: true path: ${{ github.workspace }}/src/${{ matrix.key }} @@ -78,10 +73,10 @@ jobs: path: ${{ github.workspace }}/src/kayobe-config commit-message: >- Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }} - branch: update-dependency/${{ matrix.key }} + branch: update-dependency/${{ matrix.key }}/${{ inputs.openstack_version }} delete-branch: true title: >- - Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }} + Bump ${{ inputs.openstack_version }} ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }} body: > - This PR was created automatically to update + This PR was created automatically to update ${{ inputs.openstack_version }} ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}. diff --git a/releasenotes/notes/kolla-update-fixes-5ff55225ce85441f.yaml b/releasenotes/notes/kolla-update-fixes-5ff55225ce85441f.yaml new file mode 100644 index 000000000..1d0b34d4b --- /dev/null +++ b/releasenotes/notes/kolla-update-fixes-5ff55225ce85441f.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Allow Kolla dependency updates on non-default branches.