check_and_regenerate_v3 #159
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: check_and_regenerate_v3 | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 7 * * *" # everyday at 7 AM | |
jobs: | |
check_changes_and_create_pr: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Check for changes | |
id: check_changes | |
run: | | |
make pull-oapi-spec | |
make generate | |
git diff --quiet || echo "changes_detected=true" >> $GITHUB_OUTPUT | |
- name: Create PR | |
if: steps.check_changes.outputs.changes_detected | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
title: "v3: regenerate from new API spec" | |
body: "New changes have appeared in the API spec and egoscale v3 has been regenerated." | |
branch: generate-v3 | |
delete-branch: true | |
base: master | |
author: Exoscale <[email protected]> |