-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (59 loc) · 1.91 KB
/
build-deb-push.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
name: Build et release debian package
on:
push:
branches: [ main ]
workflow_dispatch:
inputs:
vincrement:
description: 'Package version increment (major.minor.patch)'
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch
- prerelease
jobs:
build-and-push-deb-pkg:
name: Build deb package and push to repositories
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Calaos Action Bump Version
id: calaos_version
uses: calaos/[email protected]
with:
version_fragment: ${{ github.event.inputs.vincrement || 'prerelease' }}
- name: Build package
uses: addnab/docker-run-action@v3
id: build
with:
image: ghcr.io/calaos/debian_deb_build_base
options: -v ${{ github.workspace }}:/work
run: /build-deb.sh ${{ steps.calaos_version.outputs.version_bumped }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: deb
path: pkg/*.deb
- name: Create Tag
uses: negz/create-tag@v1
with:
version: ${{ steps.calaos_version.outputs.version_bumped }}
token: ${{ secrets.ACTION_DISPATCH }}
- name: Create a Release
uses: meeDamian/[email protected]
with:
token: ${{ secrets.ACTION_DISPATCH }}
tag: ${{ steps.calaos_version.outputs.version_bumped }}
name: ${{ steps.calaos_version.outputs.version_bumped }}
prerelease: ${{ github.event.inputs.vincrement == '' }}
files: pkg/*.deb
gzip: false
- name: Update repo cache
uses: distributhor/workflow-webhook@v3
env:
webhook_url: ${{ secrets.WEBHOOK_URL }}
webhook_secret: ${{ secrets.WEBHOOK_SECRET }}