-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (98 loc) · 2.82 KB
/
bp-descriptor-wallet.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
99
100
101
102
103
104
105
106
107
name: bp-descriptor-wallet
on:
workflow_dispatch:
inputs:
target:
type: choice
description: Target
required: true
options:
- release
- nightly
force:
type: boolean
description: Force build
required: false
default: false
push:
branches:
- master
paths:
- docker/lnpbp-tools/descriptor-wallet/**
schedule:
- cron: "0 8,20 * * *"
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
commit: ${{ steps.latest-commit.outputs.sha }}
tag-commit-exists: ${{ steps.check-tag-commit.outputs.exists }}
tag-release-exists: ${{ steps.check-tag-release.outputs.exists }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get latest commit
uses: ./.github/actions/latest-commit
id: latest-commit
with:
repo: BP-WG/descriptor-wallet
branch: master
- name: Check if tag for latest commit exists in registry
uses: ./.github/actions/check-tag
id: check-tag-commit
with:
path: docker/lnpbp-tools/descriptor-wallet
tag: ${{ steps.latest-commit.outputs.sha-short }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check if tag for release exists in registry
uses: ./.github/actions/check-tag
id: check-tag-release
with:
path: docker/lnpbp-tools/descriptor-wallet
github-token: ${{ secrets.GITHUB_TOKEN }}
build-release:
needs: prepare
permissions:
contents: read
packages: write
if: ${{ (github.event_name == 'push' || github.event.inputs.target == 'release') }}
uses: ./.github/workflows/bake.yml
secrets: inherit
with:
runs-on: self-hosted
path: docker/lnpbp-tools/descriptor-wallet
target: release
build-nightly:
needs: prepare
permissions:
contents: read
packages: write
if: ${{ (github.event_name == 'schedule' || github.event.inputs.target == 'nightly') && (github.event.inputs.force || needs.prepare.outputs.tag-commit-exists == 'false') }}
uses: ./.github/workflows/bake.yml
secrets: inherit
with:
runs-on: self-hosted
path: docker/lnpbp-tools/descriptor-wallet
target: nightly
commit: ${{ needs.prepare.outputs.commit }}
build-lnpbp-tools-release:
needs: build-release
permissions:
contents: read
packages: write
uses: ./.github/workflows/bake.yml
secrets: inherit
with:
path: docker/lnpbp-tools
target: release
build-lnpbp-tools-nightly:
needs: build-nightly
permissions:
contents: read
packages: write
uses: ./.github/workflows/bake.yml
secrets: inherit
with:
path: docker/lnpbp-tools
target: nightly
dockerfile: Dockerfile.nightly