Skip to content

v9.10.0

v9.10.0 #45

Workflow file for this run

name: 'PKG: Archlinux AUR Release'
on:
workflow_dispatch:
inputs:
version:
description: "Version to release"
required: true
default: "8.0.0"
type: string
skip:
description: "Skip release"
required: false
default: false
type: boolean
release:
types: [published]
jobs:
setup:
runs-on: ubuntu-latest
name: 'Unify Inputs'
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set Version (Workflow Dispatch)
if: github.event_name == 'workflow_dispatch'
run: |
echo VERSION=${{ inputs.version }} >> $GITHUB_ENV
- name: Set Version (Release Event)
if: github.event_name == 'release'
run: |
echo VERSION=${{ github.event.release.tag_name }} >> $GITHUB_ENV
- name: Unified Version
id: version
run: |
INPUT_NAME=${{ inputs.name }}
if [[ ${INPUT_NAME} == '' ]]; then
echo "Name is empty, using default"
echo "name=mondoo" >> $GITHUB_OUTPUT
else
echo "Name: ${INPUT_NAME}"
echo "name=${INPUT_NAME}" >> $GITHUB_OUTPUT
fi
V=$(echo $VERSION | sed 's/v//')
echo "Version: $V"
echo "version=${V}" >> $GITHUB_OUTPUT
update-pkgs:
runs-on: ubuntu-latest
name: 'Generate & Locally Commit PKGBUILDs'
needs: setup
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '>=1.17.0'
- name: Execute generator (make update)
run: |
cd packages/archlinux
make update
- name: 'DEBUG: Show generated package versions'
run: |
cd packages/archlinux
echo "cnquery: $(cat cnquery/PKGBUILD | grep orignalVersion=)"
echo "cnspec: $(cat cnspec/PKGBUILD | grep orignalVersion=)"
- name: Publish cnquery AUR package
if: ${{ !inputs.skip }}
uses: KSXGitHub/[email protected]
with:
pkgname: cnquery
pkgbuild: packages/archlinux/cnquery/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: ${{ needs.setup.outputs.version }}
force_push: 'true'
- name: Publish cnspec AUR package
if: ${{ !inputs.skip }}
uses: KSXGitHub/[email protected]
with:
pkgname: cnspec
pkgbuild: packages/archlinux/cnspec/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: ${{ needs.setup.outputs.version }}
force_push: 'true'