Update Kayobe package repository versions #116
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 Kayobe package repository versions | |
on: | |
workflow_dispatch: | |
inputs: | |
filter: | |
description: Space-separated list of regular expressions matching short_name of repositories to update | |
type: string | |
required: false | |
default: "" | |
kayobe_config_branch: | |
required: false | |
description: Branch of StackHPC Kayobe configuration to use | |
default: stackhpc/2023.1 | |
env: | |
ANSIBLE_FORCE_COLOR: True | |
ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass | |
jobs: | |
package-update-kayobe: | |
name: Update Kayobe package repository versions | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Release Train & dependencies | |
uses: ./.github/actions/setup | |
with: | |
vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} | |
vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} | |
- name: Clone StackHPC Kayobe configuration repository | |
uses: actions/checkout@v4 | |
with: | |
repository: stackhpc/stackhpc-kayobe-config | |
ref: refs/heads/${{ github.event.inputs.kayobe_config_branch }} | |
path: stackhpc-kayobe-config | |
- name: Generate Kayobe Pulp repository versions | |
run: | | |
ansible-playbook -i ansible/inventory \ | |
ansible/test-pulp-repo-version-query.yml \ | |
ansible/test-kayobe-repo-version-generate.yml \ | |
-e deb_package_repo_filter="'$FILTER'" \ | |
-e rpm_package_repo_filter="'$FILTER'" \ | |
-e kayobe_config_repo_path=./stackhpc-kayobe-config/ | |
env: | |
FILTER: ${{ github.event.inputs.filter }} | |
- name: Check for version changes | |
id: git-diff | |
run: | | |
cd stackhpc-kayobe-config/ && | |
if ! git diff-index --quiet HEAD; then | |
echo "changed=true" >> $GITHUB_OUTPUT && | |
git diff --color | |
fi | |
# TODO: Commit the changes, push to a branch, and create a PR. | |
# For now, just create an artifact that the user can download. | |
- name: Upload pulp-repo-versions.yml artifact | |
if: ${{ steps.git-diff.outputs.changed == 'true' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pulp-repo-versions.yml | |
path: stackhpc-kayobe-config/etc/kayobe/pulp-repo-versions.yml | |
retention-days: 1 |