chore(ci): use github actions to sync openapi code

This commit is contained in:
Łukasz Mierzwa
2021-01-19 09:55:00 +00:00
parent cae3199b50
commit b90d99cf07
2 changed files with 35 additions and 19 deletions

35
.github/workflows/openapi.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Open API
on:
push:
branches:
- main
paths:
- internal/mapper/*/Dockerfile
jobs:
code-sync:
name: Regenerate OpenAPI client code
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Regenerate OpenAPI client code
run: make openapi-client
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3.6.0
with:
token: ${{ secrets.GH_REPO_TOKEN }}
author: "Łukasz Mierzwa <l.mierzwa@gmail.com>"
commit-message: "chore(backend): regenerate openapi code"
branch: openapi-sync
delete-branch: true
title: "chore(backend): regenerate openapi code"
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"