generated from pagopa/template-java-microservice
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (37 loc) · 1.28 KB
/
update_infra.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Open a PR in Infra repository
on:
pull_request:
branches:
- main
types: [ closed ]
paths:
- 'openapi/openapi-v1.json'
- 'openapi/openapi-v2.json'
- 'openapi/openapi-node-v1.json'
- 'openapi/openapi-node-v2.json'
workflow_dispatch:
jobs:
pull-request:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# prepare openapi template for infra repo
- run: |
mkdir -p "${GITHUB_WORKSPACE}/infra"
jq '."servers"[0]."url" |= "${host}"' "${GITHUB_WORKSPACE}/openapi/openapi.json" > "${GITHUB_WORKSPACE}/infra/_openapi.json.tpl"
# open a PR on infra repo
- name: Create pull request
uses: jacopocarlini/action-pull-request-another-repo@main
env:
API_TOKEN_GITHUB: ${{ secrets.BOT_TOKEN_GITHUB }}
with:
source_folder: 'infra'
destination_repo: 'pagopa/pagopa-infra'
destination_folder: 'src/domains/afm-app/api/calculator-service/v1'
destination_base_branch: 'main'
destination_head_branch: 'AFM-Calculator-swagger-update'
user_email: 'github-bot@pagopa.it'
user_name: 'pagopa-github-bot'
allow_force_push: 'true'