-
Notifications
You must be signed in to change notification settings - Fork 7
127 lines (106 loc) · 3.49 KB
/
Copy pathmetadata.yml
File metadata and controls
127 lines (106 loc) · 3.49 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Create metadata
on:
workflow_dispatch:
inputs:
full:
description: 'Whether to build the full metadata image (including all tools) instead of the minimal one.'
type: choice
default: "false"
options:
- "false"
- "true"
workflow_run:
workflows:
- Tag latest
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
metadata:
name: Create metadata
if: ${{ github.event.inputs.full == 'false' }}
permissions:
packages: write
id-token: write
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Install uniget
uses: uniget-org/uniget-action@2139e70435b6bd47834b7be785d7cb90bf18be6b # v1.0.5
with:
prefix: helper
tools: jq regclient yq cosign
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # 4.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # 4.0.0
- name: Login to GitHub Container Registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ghcr.io
username: uniget-bot
password: ${{ secrets.GITHUB_TOKEN }}
- name: Update metadata
run: |
make metadata.json--push
- name: Store logs
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: metadata-build.log.zip
path: "@metadata/build.log"
metadata-full:
name: Create full metadata
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.inputs.full == 'true' }}
permissions:
packages: write
id-token: write
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Install uniget
uses: uniget-org/uniget-action@2139e70435b6bd47834b7be785d7cb90bf18be6b # v1.0.5
with:
prefix: helper
tools: jq regclient yq cosign jc
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # 4.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # 4.0.0
- name: Login to GitHub Container Registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ghcr.io
username: uniget-bot
password: ${{ secrets.GITHUB_TOKEN }}
- name: Export git history
run: |
make history.json
- name: Update metadata
run: |
make -j$(nproc) \
metadata-full.json
make \
metadata-full.json--push
- name: Store logs
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: metadata-build.log.zip
path: "@metadata/build.log"
pages:
name: Trigger creation of tools page
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.inputs.full == 'true' }}
needs:
- metadata-full
uses: ./.github/workflows/trigger-pages.yml
secrets:
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITLAB_TRIGGER_TOOLS: ${{ secrets.GITLAB_TRIGGER_TOOLS }}