forked from rancher/agent
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (54 loc) · 1.85 KB
/
Copy pathvalidate.yml
File metadata and controls
59 lines (54 loc) · 1.85 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
name: Validate Node Agent
on:
workflow_dispatch:
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Check out immutable Node Agent source
env:
SOURCE_SHA: ${{ github.sha }}
run: |
set -euo pipefail
git init .
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
git fetch --depth=1 origin "$SOURCE_SHA"
git -c advice.detachedHead=false checkout --detach FETCH_HEAD
test "$(git rev-parse HEAD)" = "$SOURCE_SHA"
test -z "$(git status --short)"
- name: Test and package immutable artifacts
id: package
env:
CROSS: "1"
VERSION_OVERRIDE: v0.13.22
run: |
set -euo pipefail
make ci
linux_asset="dist/artifacts/node-agent-0.13.22.tar.gz"
windows_asset="dist/artifacts/node-agent-0.13.22-windows-amd64.zip"
test -s "$linux_asset"
test -s "$windows_asset"
gzip -t "$linux_asset"
unzip -t "$windows_asset"
(
cd dist/artifacts
sha256sum \
node-agent-0.13.22.tar.gz \
node-agent-0.13.22-windows-amd64.zip >SHA256SUMS
)
printf 'NODE_AGENT_VALIDATION_OK source=%s version=%s artifacts=linux,windows\n' \
"$GITHUB_SHA" "$VERSION_OVERRIDE"
- name: Retain reviewed release candidate
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: node-agent-0.13.22
path: |
dist/artifacts/node-agent-0.13.22.tar.gz
dist/artifacts/node-agent-0.13.22-windows-amd64.zip
dist/artifacts/SHA256SUMS
if-no-files-found: error
retention-days: 30
compression-level: 0