Skip to content

Commit

Permalink
update actions to download deck
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolb committed Sep 8, 2023
1 parent 086a11b commit bde3f45
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/spectral.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,42 +42,39 @@ jobs:
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }}
if: github.event_name == 'release'

- name: Setup Deck
run: |
curl -sL https://github.com/kong/deck/releases/download/v1.25.0/deck_1.25.0_linux_amd64.tar.gz -o deck.tar.gz
tar -xf deck.tar.gz -C /tmp
sudo cp /tmp/deck /usr/local/bin/
# Ping to your Kong instance
- name: decK ping
id: decK_ping
uses: ikeike443/decK-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DECK_GROUP_NAME: ${{ secrets.DECK_GROUP_NAME }}
DECK_PAT: ${{ secrets.DECK_PAT }}
with:
command: "ping"
options: "--konnect-runtime-group-name ${{ secrets.DECK_GROUP_NAME }} --konnect-token ${{ secrets.DECK_PAT }}"
run: deck ping --konnect-runtime-group-name ${{ secrets.DECK_GROUP_NAME }} --konnect-token ${{ secrets.DECK_PAT }}
if: github.event_name == 'release'

# Generate Config File to sync
- name: decK file openapi2kong
id: deck_file_openapi2kong
uses: ikeike443/decK-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DECK_GROUP_NAME: ${{ secrets.DECK_GROUP_NAME }}
DECK_PAT: ${{ secrets.DECK_PAT }}
with:
command: "file openapi2kong"
options: "--spec ./spec/petStore.json output-file ./kong/petStoreKong.yaml"
run: deck file openapi2kong --spec ./spec/petStore.json output-file ./kong/petStoreKong.yaml
if: github.event_name == 'release'

# Sync the state of the files to the Kong instance and update the deployment status in your repo by GitHub Deployment API
- name: decK sync
id: decK_sync
uses: ikeike443/decK-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DECK_GROUP_NAME: ${{ secrets.DECK_GROUP_NAME }}
DECK_PAT: ${{ secrets.DECK_PAT }}
with:
command: "sync -s petStoreKong.yaml"
options: "--konnect-runtime-group-name ${{ secrets.DECK_GROUP_NAME }} --konnect-token ${{ secrets.DECK_PAT }}"
github_token: ${{ secrets.GITHUB_TOKEN }}
run: deck sync -s petStoreKong.yaml --konnect-runtime-group-name ${{ secrets.DECK_GROUP_NAME }} --konnect-token ${{ secrets.DECK_PAT }}
if: github.event_name == 'release'

0 comments on commit bde3f45

Please sign in to comment.