mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-03 05:10:16 +03:00
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.20.0 to 2.20.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/step-security/harden-runner/releases">step-security/harden-runner's releases</a>.</em></p> <blockquote> <h2>v2.20.1</h2> <h2>What's Changed</h2> <ul> <li>AWS CodeBuild-hosted runner support</li> <li>Implicitly allow single-labeled (internal) domains in block-mode</li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/step-security/harden-runner/compare/v2.20.0...v2.20.1">https://github.com/step-security/harden-runner/compare/v2.20.0...v2.20.1</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/step-security/harden-runner/commit/b09bb98e06d4d774595224525879c09bc6e98c40"><code>b09bb98</code></a> Merge pull request <a href="https://redirect.github.com/step-security/harden-runner/issues/680">#680</a> from step-security/aws-code-build</li> <li><a href="https://github.com/step-security/harden-runner/commit/35cd77bcf669054f67ffd3d2802ee54a4f13b5b6"><code>35cd77b</code></a> docs: document the Global Block List in the features list</li> <li><a href="https://github.com/step-security/harden-runner/commit/bb6dbef4bf53876cd2710acd1d36413620d20fb3"><code>bb6dbef</code></a> chore: rebuild dist with clean dependency install</li> <li><a href="https://github.com/step-security/harden-runner/commit/98f73c5a0d2b2cc518e6fb8d973a0a4dde00ba13"><code>98f73c5</code></a> chore: update eBPF agent to v1.8.14</li> <li><a href="https://github.com/step-security/harden-runner/commit/54193c17a4fa3883977217b9afe20378ebe60b19"><code>54193c1</code></a> Reapply "feat(runners): detect AWS CodeBuild-hosted runners as third-party pr...</li> <li><a href="https://github.com/step-security/harden-runner/commit/d22dd481cea4e96cedde031cfe600c248b592d54"><code>d22dd48</code></a> Revert "fix(self-hosted): flush agent events at job end when deploy-on-self-h...</li> <li><a href="https://github.com/step-security/harden-runner/commit/0ff09412fb572363b483a3c86ffe52fe61d9fd19"><code>0ff0941</code></a> fix(self-hosted): flush agent events at job end when deploy-on-self-hosted-vm...</li> <li><a href="https://github.com/step-security/harden-runner/commit/a3c333d110c8d95f34488a22e0e56742cfb1b14f"><code>a3c333d</code></a> Revert "feat(runners): detect AWS CodeBuild-hosted runners as third-party pro...</li> <li><a href="https://github.com/step-security/harden-runner/commit/bf94c00d6bba2ae7c4a479b86653039811569968"><code>bf94c00</code></a> feat(runners): detect AWS CodeBuild-hosted runners as third-party provider</li> <li><a href="https://github.com/step-security/harden-runner/commit/514522c5e449f9e28fc901f770e08a573d413e67"><code>514522c</code></a> fix(self-hosted): resolve runner user when USER env var is unset</li> <li>See full diff in <a href="https://github.com/step-security/harden-runner/compare/bf7454d06d71f1098171f2acdf0cd4708d7b5920...b09bb98e06d4d774595224525879c09bc6e98c40">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
130 lines
4.8 KiB
YAML
130 lines
4.8 KiB
YAML
name: Publish to AUR
|
|
|
|
on:
|
|
release:
|
|
types: [released]
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "Version to publish (e.g. 2.9.2 — no v prefix)"
|
|
required: true
|
|
type: string
|
|
dry_run:
|
|
description: "Skip the AUR push (safe test)"
|
|
type: boolean
|
|
default: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
get-release-info:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
version: ${{ steps.info.outputs.version }}
|
|
deb_sha256: ${{ steps.hashes.outputs.deb_sha256 }}
|
|
jar_sha256: ${{ steps.hashes.outputs.jar_sha256 }}
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Extract version from tag or manual input
|
|
id: info
|
|
env:
|
|
DISPATCH_VERSION: ${{ inputs.version }}
|
|
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
run: |
|
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
|
VERSION="$DISPATCH_VERSION"
|
|
else
|
|
VERSION="$RELEASE_TAG"
|
|
fi
|
|
VERSION="${VERSION#v}"
|
|
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Download release assets and compute SHA256
|
|
id: hashes
|
|
env:
|
|
VERSION: ${{ steps.info.outputs.version }}
|
|
run: |
|
|
BASE="https://github.com/Stirling-Tools/Stirling-PDF/releases/download/v${VERSION}"
|
|
|
|
download_sha256() {
|
|
local url="$1"
|
|
local file
|
|
file=$(basename "$url")
|
|
curl -fsSL --retry 3 -o "$file" "$url"
|
|
sha256sum "$file" | awk '{print $1}'
|
|
}
|
|
|
|
DEB_SHA=$(download_sha256 "${BASE}/Stirling-PDF-linux-x86_64.deb")
|
|
JAR_SHA=$(download_sha256 "${BASE}/Stirling-PDF-with-login.jar")
|
|
|
|
echo "deb_sha256=$DEB_SHA" >> "$GITHUB_OUTPUT"
|
|
echo "jar_sha256=$JAR_SHA" >> "$GITHUB_OUTPUT"
|
|
|
|
publish-aur:
|
|
environment: package-publish
|
|
needs: get-release-info
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout repository (for PKGBUILD templates)
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Update stirling-pdf-desktop PKGBUILD
|
|
env:
|
|
VERSION: ${{ needs.get-release-info.outputs.version }}
|
|
DEB_SHA: ${{ needs.get-release-info.outputs.deb_sha256 }}
|
|
run: |
|
|
PKGBUILD=".github/aur/stirling-pdf-desktop/PKGBUILD"
|
|
sed -i "s/^pkgver=.*/pkgver=${VERSION}/" "$PKGBUILD"
|
|
sed -i "s/^pkgrel=.*/pkgrel=1/" "$PKGBUILD"
|
|
sed -i "s/'PLACEHOLDER_DEB_SHA256'/'${DEB_SHA}'/" "$PKGBUILD"
|
|
|
|
# Disabled until we sort out the server packaging story.
|
|
# The third-party stirling-pdf-bin on AUR currently covers a similar use case.
|
|
# - name: Update stirling-pdf-server-bin PKGBUILD
|
|
# env:
|
|
# VERSION: ${{ needs.get-release-info.outputs.version }}
|
|
# JAR_SHA: ${{ needs.get-release-info.outputs.jar_sha256 }}
|
|
# run: |
|
|
# PKGBUILD=".github/aur/stirling-pdf-server-bin/PKGBUILD"
|
|
# sed -i "s/^pkgver=.*/pkgver=${VERSION}/" "$PKGBUILD"
|
|
# sed -i "s/^pkgrel=.*/pkgrel=1/" "$PKGBUILD"
|
|
# sed -i "s/'PLACEHOLDER_JAR_SHA256'/'${JAR_SHA}'/" "$PKGBUILD"
|
|
|
|
- name: Show updated PKGBUILD (for dry-run visibility)
|
|
run: |
|
|
echo "--- stirling-pdf-desktop PKGBUILD ---"
|
|
cat .github/aur/stirling-pdf-desktop/PKGBUILD
|
|
|
|
- name: Publish stirling-pdf-desktop to AUR
|
|
if: ${{ github.event_name == 'release' || inputs.dry_run == false }}
|
|
uses: KSXGitHub/github-actions-deploy-aur@084b0d9b15415bf9cdb65d44dad1efe37a354050 # v4.2.0
|
|
with:
|
|
pkgname: stirling-pdf-desktop
|
|
pkgbuild: .github/aur/stirling-pdf-desktop/PKGBUILD
|
|
commit_username: Stirling PDF Inc
|
|
commit_email: contact@stirlingpdf.com
|
|
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
|
commit_message: "Update to v${{ needs.get-release-info.outputs.version }}"
|
|
|
|
# Disabled until we sort out the server packaging story.
|
|
# - name: Publish stirling-pdf-server-bin to AUR
|
|
# if: ${{ github.event_name == 'release' || inputs.dry_run == false }}
|
|
# uses: KSXGitHub/github-actions-deploy-aur@2ac5a4c1d7035885d46b10e3193393be8460b6f1 # v4.1.1
|
|
# with:
|
|
# pkgname: stirling-pdf-server-bin
|
|
# pkgbuild: .github/aur/stirling-pdf-server-bin/PKGBUILD
|
|
# commit_username: Stirling PDF Inc
|
|
# commit_email: contact@stirlingpdf.com
|
|
# ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
|
# commit_message: "Update to v${{ needs.get-release-info.outputs.version }}"
|