Skip to content

Commit 8f0788c

Browse files
authored
Create linux.yml
1 parent 6799a21 commit 8f0788c

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/linux.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Linux
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
compose-job:
8+
runs-on: ubuntu-24.04
9+
10+
steps:
11+
- name: 🛸 Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: 🚀 Set up Docker Buildx (optional, but helpful)
15+
uses: docker/setup-buildx-action@v3
16+
17+
- name: 🐳 Set up Docker Compose
18+
run: |
19+
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
20+
sudo chmod +x /usr/local/bin/docker-compose
21+
22+
- name: 🔥 Build & start containers
23+
run: docker-compose up --build -d
24+
25+
- name: 📥 Copy wheels to host
26+
run: |
27+
docker cp octdata4python:/home/appuser/oct/octdata4python/wheelhouse .
28+
29+
- name: 🧹 Tear down containers
30+
run: docker-compose down
31+
32+
- name: Fetch latest commit hash
33+
id: get_commit_hash
34+
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
35+
36+
- name: Create GitHub Release
37+
uses: softprops/action-gh-release@v2
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
files: |
42+
wheelhouse/octdata4python-0.1.0-cp310-cp310-manylinux_2_39_x86_64.whl
43+
wheelhouse/octdata4python-0.1.0-cp311-cp311-manylinux_2_39_x86_64.whl
44+
wheelhouse/octdata4python-0.1.0-cp312-cp312-manylinux_2_39_x86_64.whl
45+
body: Release created automatically from workflow.
46+
draft: true
47+
tag_name: ${{ steps.get_commit_hash.outputs.hash }}

0 commit comments

Comments
 (0)