Skip to content

Modernize and secure PastureStack node agent #11

Modernize and secure PastureStack node agent

Modernize and secure PastureStack node agent #11

Workflow file for this run

name: Validate Node Agent
on:
push:
branches:
- 'verification/node-agent-*'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: node-agent-validation-${{ github.ref }}
cancel-in-progress: false
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.23
run: |
set -euo pipefail
make ci
linux_asset="dist/artifacts/node-agent-0.13.23.tar.gz"
windows_asset="dist/artifacts/node-agent-0.13.23-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.23.tar.gz \
node-agent-0.13.23-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.23
path: |
dist/artifacts/node-agent-0.13.23.tar.gz
dist/artifacts/node-agent-0.13.23-windows-amd64.zip
dist/artifacts/SHA256SUMS
if-no-files-found: error
retention-days: 30
compression-level: 0