Repository navigation
Teach launch-period free usage in the operative skill #49
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: public plugin gates | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: public-plugin-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: "22" | |
| - name: Reproduce the exact pinned CLI artifact | |
| run: | | |
| test "$(jq -r .state components.lock.json)" = resolved | |
| repository="$(jq -r .cli.repository components.lock.json)" | |
| commit="$(jq -r .cli.commit components.lock.json)" | |
| filename="$(jq -r .cli.artifact.file components.lock.json)" | |
| expected="$(jq -r .cli.artifact.sha256 components.lock.json)" | |
| test "${repository}" = screenrig/cli | |
| install -d "${RUNNER_TEMP}/screenrig-cli-source" | |
| git -C "${RUNNER_TEMP}/screenrig-cli-source" init --quiet | |
| git -C "${RUNNER_TEMP}/screenrig-cli-source" fetch --no-tags --depth=1 \ | |
| "https://github.com/${repository}.git" "${commit}" | |
| git -C "${RUNNER_TEMP}/screenrig-cli-source" checkout --quiet --detach FETCH_HEAD | |
| test "$(git -C "${RUNNER_TEMP}/screenrig-cli-source" rev-parse HEAD)" = "${commit}" | |
| npm --prefix "${RUNNER_TEMP}/screenrig-cli-source" ci | |
| npm --prefix "${RUNNER_TEMP}/screenrig-cli-source" run build | |
| install -d "${RUNNER_TEMP}/screenrig-cli" | |
| bash "${RUNNER_TEMP}/screenrig-cli-source/scripts/package-release.sh" \ | |
| "${RUNNER_TEMP}/screenrig-cli/${filename}" | |
| test -f "${RUNNER_TEMP}/screenrig-cli/${filename}" | |
| printf '%s %s\n' "${expected}" "${RUNNER_TEMP}/screenrig-cli/${filename}" \ | |
| | sha256sum --check --status | |
| - name: Rebuild and verify the committed plugin bundle | |
| run: | | |
| filename="$(jq -r .cli.artifact.file components.lock.json)" | |
| python3 scripts/build-plugin.py --check --cli-artifact "${RUNNER_TEMP}/screenrig-cli/${filename}" | |
| python3 scripts/validate-plugin.py --cli-artifact "${RUNNER_TEMP}/screenrig-cli/${filename}" --cli-source "${RUNNER_TEMP}/screenrig-cli-source" | |
| python3 scripts/check-public-repo.py | |
| - name: Package deterministic plugin artifact | |
| run: >- | |
| tar --sort=name --format=ustar --mtime=@0 --owner=0 --group=0 | |
| --numeric-owner --mode=u=rwX,go=rX -C plugins/screenrig -cf - . | |
| | gzip -n -9 > "${RUNNER_TEMP}/screenrig-plugin.tar.gz" | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: screenrig-plugin | |
| path: ${{ runner.temp }}/screenrig-plugin.tar.gz | |
| if-no-files-found: error | |
| retention-days: 14 | |
| secrets: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install checksum-pinned Gitleaks | |
| env: | |
| GITLEAKS_VERSION: 8.30.1 | |
| GITLEAKS_SHA256: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb | |
| run: | | |
| install -d "${RUNNER_TEMP}/screenrig-tools/gitleaks" | |
| archive="${RUNNER_TEMP}/screenrig-tools/gitleaks.tar.gz" | |
| curl --proto '=https' --tlsv1.2 --fail --silent --show-error --location \ | |
| "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \ | |
| --output "${archive}" | |
| printf '%s %s\n' "${GITLEAKS_SHA256}" "${archive}" | sha256sum --check --status | |
| tar --extract --gzip --file "${archive}" \ | |
| --directory "${RUNNER_TEMP}/screenrig-tools/gitleaks" gitleaks | |
| chmod 0755 "${RUNNER_TEMP}/screenrig-tools/gitleaks/gitleaks" | |
| - name: Scan complete Git history for secrets | |
| run: >- | |
| "${RUNNER_TEMP}/screenrig-tools/gitleaks/gitleaks" git | |
| --redact --no-banner --config .gitleaks.toml . |