Skip to content

Commit

Permalink
Update update_operators.yml to allow automatic sync (#1312)
Browse files Browse the repository at this point in the history
* Add distinct_id input to update_operators.yml

* update_operators.yml: create PRs with token PYANSYS_CI_BOT_TOKEN

* update_operators.yml: create PRs with token CI_TOKEN

* update_operators.yml: create PRs with token CI_TOKEN

* update_operators.yml: create PRs with GH App

* update_operators.yml: label PR as server-sync

* update_operators.yml: switch to tibdex/github-app-token@v2

* update_operators.yml: switch back to PAT

* update_operators.yml: Add reviewers and assignees

* update_operators.yml: Add reviewers and assignees

* Apply suggestions from code review

Co-authored-by: ClappeB-Ansys <[email protected]>

---------

Co-authored-by: ClappeB-Ansys <[email protected]>
  • Loading branch information
PProfizi and BClappe authored Dec 8, 2023
1 parent 6f8e75a commit 9cfd83b
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/update_operators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
# Can be called manually or remotely
workflow_dispatch:
inputs:
distinct_id:
description: "ID to give the job when run via dpf-standalone repo"
required: false
type: string
default: ""

ANSYS_VERSION:
description: "ANSYS version"
required: false
Expand All @@ -27,6 +33,9 @@ jobs:
runs-on: windows-latest

steps:
- name: echo distinct ID ${{ github.event.inputs.distinct_id }}
run: echo ${{ github.event.inputs.distinct_id }}

- uses: actions/checkout@v3

- name: Setup Python
Expand Down Expand Up @@ -112,6 +121,12 @@ jobs:
run: |
git status
# - uses: tibdex/github-app-token@v2 # To use once GH App is set at ansys org level
# id: generate-token
# with:
# app_id: ${{ secrets.CI_APP_ID }}
# private_key: ${{ secrets.CI_APP_TOKEN }}

- name: "Create Pull Request"
uses: peter-evans/create-pull-request@v4
with:
Expand All @@ -126,7 +141,13 @@ jobs:
title: Update generated code for DPF ${{ github.event.inputs.ANSYS_VERSION || '242' }}${{ github.event.inputs.standalone_branch_suffix || '' }} on ${{ github.ref_name }}
body: An update of generated code has been triggered either manually or by an update in the dpf-standalone repository.
branch: maint/update_code_for_${{ github.event.inputs.ANSYS_VERSION || '242' }}${{ github.event.inputs.standalone_branch_suffix || '' }}_on_${{ github.ref_name }}
labels: maintenance
labels: server-sync
# token: ${{ steps.generate-token.outputs.token }}
token: ${{ secrets.CI_PAT }}
committer: PProfizi <[email protected]>
author: PProfizi <[email protected]>
reviewers: ansys/dpf_integration_proxies
assignees: ansys/dpf_integration_proxies

- name: "Kill all servers"
uses: ansys/pydpf-actions/[email protected]
Expand Down

0 comments on commit 9cfd83b

Please sign in to comment.