-
Notifications
You must be signed in to change notification settings - Fork 1
98 lines (85 loc) · 3.13 KB
/
update-latest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Update OpenAPI specs to latest
on:
repository_dispatch:
types: [openapi-update]
workflow_dispatch:
jobs:
update-to-latest:
name: "Update specs to latest"
runs-on: ubuntu-latest
steps:
- name: Checkout OpenAPI
uses: actions/checkout@v4
- name: "Set up Python 3.11"
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install OS packages
run: |
sudo apt-get update
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
path: localstack-ext
token: ${{ secrets.PRO_GITHUB_TOKEN }}
- name: Install Python Dependencies for Pro
working-directory: localstack-ext
run: make install
- name: Link Community into Pro venv
working-directory: localstack-ext
run: |
source .venv/bin/activate
pip install -e ../localstack[runtime,test]
- name: Create Community Entrypoints
working-directory: localstack
# Entrypoints need to be generated _after_ the community edition has been linked into the venv
run: |
VENV_DIR="../localstack-ext/.venv" make entrypoints
- name: Create Pro Entrypoints
working-directory: localstack-ext
run: |
make entrypoints
- name: Generate the latest spec
run: |
source localstack-ext/.venv/bin/activate
python bin/update_aws_spec.py --latest
- name: Create PR
uses: peter-evans/create-pull-request@v7
with:
title: "Update latest 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]>"
commit-message: "Update latest OpenAPI spec"
token: ${{ secrets.GITHUB_TOKEN }}
reviewers: giograno
add-paths: |
openapi/*.yml