Download Schemas #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Download Schemas | |
on: | |
workflow_dispatch: | |
inputs: | |
kong-image-tag: | |
required: true | |
type: string | |
description: | | |
Kong Docker image tag to run, 3.6.1.4. | |
version: | |
required: true | |
type: string | |
description: | | |
Kong Gateway release, e.x. 3.4.x. | |
Used by some commands for storing files in the corresponding folder. | |
kong-image-name: | |
type: choice | |
description: | | |
Kong Docker image name to use, e.g. kong-gateway, kong-gateway-dev. | |
options: | |
- kong-gateway | |
- kong-gateway-dev | |
jobs: | |
download-schemas: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ./.github/reusable-steps/install-deps | |
- name: Run Kong EE | |
uses: ./.github/reusable-steps/run-kong-ee | |
with: | |
op-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
kong-image-tag: ${{ github.event.inputs.kong-image-tag }} | |
kong-image-name: ${{ github.event.inputs.kong-image-name }} | |
- name: Run download_schemas | |
run: | | |
bundle exec ./plugins download_schemas --version=${{ github.event.inputs.version }} --plugins $(ls ./schemas) --verbose | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.PAT }} | |
title: "Download Schemas for ${{ github.event.inputs.version }}" | |
branch: download-schemas | |
commit-message: "Download Schemas for ${{ github.event.inputs.version }}" | |
delete-branch: true | |
add-paths: | | |
./schemas/* | |
- name: Cleanup | |
if: always() | |
uses: ./.github/reusable-steps/cleanup |