ci: add Unifi version used when updating generated controlled modules to commit and PR messages
This commit is contained in:
20
.github/workflows/generate.yaml
vendored
20
.github/workflows/generate.yaml
vendored
@@ -4,16 +4,32 @@ on:
|
|||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fields:
|
fields:
|
||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: 'actions/checkout@v4'
|
- uses: 'actions/checkout@v4'
|
||||||
|
|
||||||
- uses: 'actions/setup-go@v5'
|
- uses: 'actions/setup-go@v5'
|
||||||
|
|
||||||
|
|
||||||
|
- name: "Generate new client structures"
|
||||||
|
run: 'go generate unifi/fields.go'
|
||||||
|
|
||||||
|
- name: Read Unifi version marker
|
||||||
|
id: unifi_version
|
||||||
|
uses: 'juliangruber/read-file-action@v1'
|
||||||
|
with:
|
||||||
|
path: ./unifi-version
|
||||||
|
trim: 'true'
|
||||||
|
|
||||||
# TODO: Automatically merge the PR if tests pass.
|
# TODO: Automatically merge the PR if tests pass.
|
||||||
- run: 'go generate unifi/fields.go'
|
|
||||||
- uses: 'peter-evans/create-pull-request@v7'
|
- uses: 'peter-evans/create-pull-request@v7'
|
||||||
with:
|
with:
|
||||||
delete-branch: true
|
delete-branch: true
|
||||||
title: 'Update to latest controller version'
|
title: 'feat: update to the controller version ${{ steps.unifi_version.outputs.content }}'
|
||||||
|
commit-message: 'feat: update to the controller version ${{ steps.unifi_version.outputs.content }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user