EDI@Energy KohlrAHBi FV2504 Changes 2024-12-14T10-24-19 (Triggered by… #1
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: Create PR to generate AHB diffs via `ahlbatross` on machine-read.-AHBs updates of Formatversion directories. | |
# workflow is activated when this repository receives automatic updates from kohlr_AHB_i due to new releases by BREW. | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "FV*/**" # trigger only when actual AHBs are updated (ignore dependabot and miscellaneous commits) | |
jobs: | |
generate-diffs: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
format_version: | |
[ | |
"FV2104", | |
"FV2110", | |
"FV2210", | |
"FV2304", | |
"FV2310", | |
"FV2404", | |
"FV2410", | |
"FV2504", | |
"FV2510", | |
] | |
permissions: | |
contents: write | |
pull-requests: write | |
checks: write | |
statuses: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: Install updated package | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Get current time | |
uses: srfrnk/current-time@master | |
id: current-time | |
with: | |
format: YYYY-MM-DDTHH-mm-ss | |
- name: Generate content | |
run: | | |
mkdir -p diff | |
ahlbatross -i . -o diff | |
- name: Create Pull Request | |
id: create-pr | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: "Update AHB diffs for ${{ matrix.format_version }}" | |
title: "chore: update AHB diffs for ${{ matrix.format_version }}" | |
branch: "update-${{ matrix.format_version }}-${{ steps.current-time.outputs.formattedTime }}" | |
delete-branch: true | |
reviewers: | | |
OLILHR | |
@Hochfrequenz/python-developers-review-team | |
- name: Enable auto-merge | |
if: steps.create-pr.outputs.pull-request-operation == 'created' | |
run: | | |
gh pr merge --auto --merge "${{ steps.create-pr.outputs.pull-request-number }}" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |