Modernize and secure PastureStack node agent #14
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| 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 |