Skip to content

Moduli merging workflow #92

Moduli merging workflow

Moduli merging workflow #92

Workflow file for this run

---
name: Moduli merging workflow
on:
workflow_dispatch:
schedule:
- cron: "30 4 * * */6"
permissions:
contents: read
jobs:
Generate:
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Set current date as env variable
run: echo CURRENT_DATE=$(date +'%Y%m%d') >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.head_ref }}
- name: Generate moduli file
run: |
set -eu -o pipefail
curl -fsSL "https://raw.githubusercontent.com/openssh/openssh-portable/master/moduli" | grep -v '^#' > /tmp/moduli.tmp
curl -fsSL "https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.bin/ssh/moduli-gen/moduli.{3072,4096,6144,7680,8192}" >> /tmp/moduli.tmp
echo "# Generated at ${{ env.CURRENT_DATE }} from ${{ github.repositoryUrl }}" > ./moduli
echo "# Timestamp Type Tests Trials Size Generator Modulus" >> ./moduli
awk '$5 >= 3071' /tmp/moduli.tmp | grep -vE '^$|#'| sort -u >> ./moduli
rm -v /tmp/moduli.tmp
head -n5 ./moduli
- name: Upload moduli artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: moduli
path: ./moduli
- uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: Updated moduli file - ${{ env.CURRENT_DATE }}