Skip to content

Commit

Permalink
Add branch ref when building the spec
Browse files Browse the repository at this point in the history
  • Loading branch information
giograno committed Oct 15, 2024
1 parent 22fab2c commit 87c201d
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/update-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout OpenAPI
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Set up Python 3.11"
id: setup-python
Expand All @@ -24,12 +24,33 @@ jobs:
sudo apt-get install -y --allow-downgrades libsnappy-dev jq postgresql-14=14.13-0ubuntu0* postgresql-client postgresql-plpython3 libvirt-dev
- name: Checkout Community
uses: actions/checkout@v4
id: community-checkout
continue-on-error: true
with:
repository: localstack/localstack
path: localstack
ref: ${{ github.event.client_payload.ref }}

- name: Community - fallback to main branch
if: steps.community-checkout.outcome == 'failure'
uses: actions/checkout@v4
with:
repository: localstack/localstack
path: localstack

- name: Checkout Pro
uses: actions/checkout@v4
id: pro-checkout
continue-on-error: true
with:
repository: localstack/localstack-ext
path: localstack-ext
token: ${{ secrets.PRO_GITHUB_TOKEN }}
ref: ${{ github.event.client_payload.ref }}

- name: Pro - fallback to master branch
if: steps.pro-checkout.outcome == 'failure'
uses: actions/checkout@v4
with:
repository: localstack/localstack-ext
Expand Down Expand Up @@ -66,7 +87,7 @@ jobs:
uses: peter-evans/create-pull-request@v7
with:
title: "Update latest OpenAPI spec"
body: "This PR update the latest version of the LocalStack's OpenAPI spec."
body: "This PR updates the latest version of the LocalStack's OpenAPI spec."
branch: "update-latest"
author: "LocalStack Bot <[email protected]>"
committer: "LocalStack Bot <[email protected]>"
Expand Down

0 comments on commit 87c201d

Please sign in to comment.