-
Notifications
You must be signed in to change notification settings - Fork 39
111 lines (93 loc) · 3.59 KB
/
checkpoint.yaml
File metadata and controls
111 lines (93 loc) · 3.59 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
# Copyright 2024-2026 Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial
name: Checkpoint UDS Core
# Permissions for the GITHUB_TOKEN used by the workflow.
permissions:
contents: read # Allows reading the content of the repository.
packages: read # Allows reading the content of the repository's packages.
id-token: write
on:
pull_request:
# milestoned is added here as a workaround for release-please not triggering PR workflows (PRs should be added to a milestone to trigger the workflow).
# labeled is added to support renovate-ready labelling on PRs
types: [milestoned, labeled, opened, reopened, synchronize]
paths:
- packages/checkpoint-dev/**
- .github/workflows/checkpoint**
- tasks/test.yaml
- "!**/*.md"
- "!**.jpg"
- "!**.png"
- "!**.gif"
- "!**.svg"
# triggered by tag-and-release.yaml
workflow_call:
jobs:
routing:
runs-on: ubuntu-latest
outputs:
run_full_tests: ${{ steps.test-routing.outputs.run_full_tests }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Compute test routing
id: test-routing
uses: ./.github/actions/test-routing
with:
event_name: ${{ github.event_name }}
base_ref: ${{ github.base_ref }}
head_ref: ${{ github.head_ref }}
checkpoint:
needs: routing
if: ${{ needs.routing.outputs.run_full_tests == 'true' }}
strategy:
matrix:
architecture: [amd64, arm64]
runs-on: ${{ matrix.architecture == 'arm64' && 'uds-ubuntu-24-arm64-4-core' || 'uds-ubuntu-big-boy-4-core' }}
name: UDS Core Checkpoint
permissions:
contents: read
packages: write
id-token: write # This is needed for OIDC federation.
pull-requests: write # Allows writing to pull requests (needed for renovate-readiness)
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Check renovate readiness
if: startsWith(github.event.pull_request.head.ref, 'renovate/') # Only call for Renovate PRs
uses: ./.github/actions/renovate-readiness
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Environment setup
uses: ./.github/actions/setup
with:
ghToken: ${{ secrets.GITHUB_TOKEN }}
installK3d: 'true'
- name: Deploy K3d + Latest UDS Core Slim Bundle
if: ${{ github.event_name != 'pull_request' }}
run: |
uds run -f tasks/deploy.yaml latest-slim-bundle-release --no-progress
- name: Deploy K3d + Source UDS Core Slim Bundle
if: ${{ github.event_name == 'pull_request' }}
run: |
uds run slim-dev --no-progress
- name: Create Checkpoint Package
run: |
uds run -f tasks/create.yaml checkpoint-dev-package --no-progress
- name: Deploy Checkpoint Package
run: |
uds run -f tasks/deploy.yaml checkpoint-package --no-progress
- name: Test Checkpoint Package
continue-on-error: ${{ matrix.architecture == 'arm64' }}
run: |
npm ci
uds run test:slim-dev --no-progress
- name: Debug Output
if: always()
uses: ./.github/actions/debug-output
- name: Publish Checkpoint Package
if: ${{ github.event_name != 'pull_request' }}
run: uds run -f tasks/publish.yaml checkpoint-package --no-progress
- name: Save logs
if: always()
uses: ./.github/actions/save-logs
with:
suffix: -${{ matrix.architecture }}