Repository navigation
83 lines (76 loc) · 2.16 KB
/
Copy pathnightly-build.yml
File metadata and controls
83 lines (76 loc) · 2.16 KB
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
name: Nightly Build
on:
schedule:
- cron: '0 22 * * *'
workflow_dispatch:
inputs:
identifier:
description: Optional nightly identifier (current UTC YYYYMMDD.N with an unused increasing N)
required: false
type: string
concurrency:
group: nightly-build
queue: max
cancel-in-progress: false
permissions:
contents: read
actions: read
jobs:
Check:
if: github.repository == 'diffscope/diffscope-package-manager' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
outputs:
should_build: ${{ steps.check.outputs.should_build }}
steps:
- name: Checkout source
uses: actions/checkout@v6
with:
ref: ${{ github.sha }}
- name: Check nightly eligibility
id: check
uses: diffscope/catalogs/actions/nightly@main
with:
operation: check
Build:
needs: Check
if: needs.Check.outputs.should_build == 'true'
permissions:
contents: write
uses: ./.github/workflows/build.yml
with:
source_sha: ${{ github.sha }}
build_type: nightly
version_identifier: ${{ inputs.identifier || '' }}
Publish:
needs: Build
runs-on: ubuntu-latest
permissions:
contents: write
actions: read
outputs:
catalog_manifest: ${{ steps.publish.outputs.catalog_manifest }}
steps:
- name: Checkout source
uses: actions/checkout@v6
with:
ref: ${{ github.sha }}
- name: Publish nightly prerelease
id: publish
uses: diffscope/catalogs/actions/nightly@main
with:
operation: publish
tag: ${{ needs.Build.outputs.tag }}
application-name: ${{ needs.Build.outputs.application_name }}
UpdateCatalogs:
needs: Publish
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- name: Update catalogs and wait for completion
uses: diffscope/catalogs/actions/update-catalog@main
with:
product: dspm
channel: nightly
manifest: ${{ needs.Publish.outputs.catalog_manifest }}
app-id: ${{ vars.WORKFLOW_APP_ID }}
private-key: ${{ secrets.WORKFLOW_APP_PRIVATE_KEY }}