From 6ca7874344844050a6a7b3e20397d2d25e198e39 Mon Sep 17 00:00:00 2001 From: ErwinsExpertise Date: Thu, 7 Dec 2023 13:38:08 -0500 Subject: [PATCH] update workflow --- .github/workflows/generator.yaml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generator.yaml b/.github/workflows/generator.yaml index fa0fd17..0655b05 100644 --- a/.github/workflows/generator.yaml +++ b/.github/workflows/generator.yaml @@ -12,10 +12,25 @@ jobs: image: openapitools/openapi-generator-cli:latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - 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: Debug workflow + run: find . + - 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 }} \ No newline at end of file