Skip to content

Commit 17ad043

Browse files
committed
Add update-data workflow
1 parent 1dc99e7 commit 17ad043

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed

.github/workflows/ostree-test.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Ostree installation test"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
update-data:
8+
runs-on: "ubuntu-latest"
9+
steps:
10+
- uses: "actions/checkout@v4"
11+
with:
12+
ref: docs-data
13+
14+
- name: "Set up Python"
15+
uses: "actions/setup-python@v5"
16+
with:
17+
python-version: "3.11"
18+
19+
- name: "Install System dependencies"
20+
run: |
21+
sudo apt install -y libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-4.0
22+
23+
- name: "Install Python dependencies"
24+
run: |
25+
pip install git+https://github.com/pedro-psb/pulp-docs@gen-and-store-api-json-in-pulp-docs
26+
# python -m pulp_docs.openapi /tmp -l pulp_ostree
27+
# python -m venv /tmp/myvenv
28+
# /tmp/myvenv/bin/pip install pulpcore git+https://github.com/pulp/pulp_ostree
29+
30+
# experiments with the deps to get it working
31+
# - name: Setup tmate session
32+
# uses: mxschmitt/action-tmate@v3
33+

.github/workflows/update-data.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Update Data Branch"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
update-data:
8+
runs-on: "ubuntu-latest"
9+
steps:
10+
- uses: "actions/checkout@v4"
11+
with:
12+
ref: docs-data
13+
14+
- name: "Set up Python"
15+
uses: "actions/setup-python@v5"
16+
with:
17+
python-version: "3.11"
18+
19+
- name: "List requirements"
20+
run: |
21+
cat requirements_system.txt
22+
cat requirements_python.txt
23+
24+
- name: "Install System dependencies"
25+
run: |
26+
# xargs sudo apt -y install < requirements_system.txt
27+
sudo apt -y install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-4.0 python3-gi
28+
sudo apt install gobject-introspection
29+
30+
- name: "Install Python dependencies"
31+
run: |
32+
pip install --upgrade pip
33+
# pip install -r requirements_python.txt
34+
pip install git+https://github.com/pulp/pulpcore
35+
pip install git+https://github.com/pulp/pulp_ostree
36+
pulpcore-manager openapi --component ostree --file /tmp/ostree-api.json
37+
38+
# - name: Setup tmate session
39+
# uses: mxschmitt/action-tmate@v3
40+
41+
# - name: "Generate, commit and push updated openapi specs"
42+
# run: |
43+
# python -m pulp_docs.openapi /tmp -l pulp_ostree
44+
# ./update-data.sh

Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM ubuntu:latest
2+
3+
RUN apt-get -y update
4+
RUN apt-get -y upgrade
5+
RUN apt-get install -y libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-4.0
6+
7+
WORKDIR app
8+
9+
COPY . .
10+
11+
CMD ["alias", "python=python3"]
12+
CMD ["./update-data.sh", "/tmp", "-l", "pulp_ostree"]

0 commit comments

Comments
 (0)