Skip to content

Moduli merging workflow #70

Moduli merging workflow

Moduli merging workflow #70

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@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: moduli
path: ./moduli
- uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: Updated moduli file - ${{ env.CURRENT_DATE }}