Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
happytreees committed Dec 7, 2023
1 parent 6572d1a commit 4adb2d4
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,28 @@ jobs:
container:
image: openapitools/openapi-generator-cli:latest
steps:
- name: Install git
run: (apt-get -y update && apt-get -y install git)
- name: Set git directory
run: (git config --global --add safe.directory "$GITHUB_WORKSPACE")
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
- name: Run code generation
run: (bash /usr/local/bin/docker-entrypoint.sh generate -i blob/v0.0.1.json --additional-properties moduleName=VultRuby --skip-validate-spec -g ruby -o ./vendor/vultr_ruby)
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
run: (bash /usr/local/bin/docker-entrypoint.sh generate -i blob/v0.0.1.json --additional-properties moduleName=VultRuby --skip-validate-spec -g ruby )
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
path: .
pull-request-job:
runs-on: ubuntu-latest
needs: generation-job
steps:
- name: Download all workflow artifacts
uses: actions/download-artifact@v3
- name: Create pull request
working-directory: /home/runner/work/vultr-ruby/vultr-ruby/artifact
run: gh pr create --title 'Automatic updates by generator' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4adb2d4

Please sign in to comment.