-
-
Notifications
You must be signed in to change notification settings - Fork 111
56 lines (52 loc) · 2.26 KB
/
debian-release.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
name: Build Debian package on release
on:
push:
branches: [ feat-create-debian-package-with-tag ]
paths-ignore:
- 'docs_src/**'
- 'README.md'
- 'CITATION'
- 'book.toml'
- 'CONTRIBUTING.md'
tags: [ 'v*.*.*', 'dev*.*.*', 'feat-*' ]
workflow_dispatch:
jobs:
create_debian_pkg_with_tag:
name: Create Debian package associated to version tag
runs-on: ubuntu-latest
steps:
- name: Checkout scaphandre repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest tag of scaphandre repository
id: latest-scaphandre-tag
uses: "WyriHaximus/[email protected]"
with:
fallback: dev0.5.18
- name: Checkout scaphandre-debian repository
uses: actions/checkout@v4
with:
repository: hubblo-org/scaphandre-debian
- name: Build package with version tag and Debian 11 Bullseye
run : |
./build.sh -v ${{ steps.latest-scaphandre-tag.outputs.tag }}
- name: Modify name of package to include tag version for Debian 11
run: |
cd target
PKG_NAME=$(ls | sed "s/\([0-9]\+\.\)\{2\}[0-9]\+\-[0-9]\+\?/${{ steps.latest-scaphandre-tag.outputs.tag }}-deb11/")
mv *.deb $PKG_NAME
- name: Upload to scw s3
run: |
s3cmd --access_key="${{ secrets.S3_ACCESS_KEY_ID }}" --secret_key="${{ secrets.S3_SECRET_ACCESS_KEY }}" --region="fr-par" --acl-public --host="s3.fr-par.scw.cloud" --host-bucket="%(bucket).s3.fr-par.scw.cloud" put ./target/$PKG_NAME s3://scaphandre/x86_64/
- name: Build package with version tag and Debian 12 Bookworm
run: |
./build.sh -i debian:bookworm-slim -v ${{ steps.latest-scaphandre-tag.outputs.tag }}
- name: Modify name of package to include tag version for Debian 12
run: |
cd target
PKG_NAME=$(ls | sed "s/\([0-9]\+\.\)\{2\}[0-9]\+\-[0-9]\+\?/${{ steps.latest-scaphandre-tag.outputs.tag }}-deb12/")
mv *.deb $PKG_NAME
- name: Upload to scw s3
run: |
s3cmd --access_key="${{ secrets.S3_ACCESS_KEY_ID }}" --secret_key="${{ secrets.S3_SECRET_ACCESS_KEY }}" --region="fr-par" --acl-public --host="s3.fr-par.scw.cloud" --host-bucket="%(bucket).s3.fr-par.scw.cloud" put ./target/$PKG_NAME s3://scaphandre/x86_64/