-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 1.53 KB
/
schedule.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
name: schedule
on:
push:
branches:
- '**'
tags:
- '**'
pull_request:
branches:
- '**'
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
metadata:
runs-on: ubuntu-latest
outputs:
releases: ${{ steps.releases.outputs.releases }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
- name: Install dependencies
run: npm ci
- name: Get Generic System Image releases
id: releases
run: |
if ${{ github.ref_type == 'tag' && 'true' || 'false' }}; then
echo "releases=$(node index.mjs ${{ github.ref_name }})" | tee -a "$GITHUB_OUTPUT"
else
echo "releases=$(node index.mjs)" | tee -a "$GITHUB_OUTPUT"
fi
release:
needs: [metadata]
permissions:
packages: write
uses: ./.github/workflows/build.yml
with:
ref: ${{ fromJSON(needs.metadata.outputs.releases)[0].build }}
artifacts: ${{ toJSON(fromJSON(needs.metadata.outputs.releases)[0].artifacts) }}
secrets: inherit
main:
needs: [metadata]
if: github.ref_type == 'branch'
permissions:
packages: write
uses: ./.github/workflows/build.yml
with:
artifacts: |
[
{ "target": "aosp_arm64" },
{ "target": "aosp_x86_64" },
{ "target": "aosp_cf_riscv64_phone" }
]
secrets: inherit