Skip to content

[SECURESIGN-1466] | Custom Rekor Configuration support with sharding #28

[SECURESIGN-1466] | Custom Rekor Configuration support with sharding

[SECURESIGN-1466] | Custom Rekor Configuration support with sharding #28

Workflow file for this run

name: Preview readme files on PRs
on:
pull_request:
paths: '**/README.md'
jobs:
preview-readme:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
env:
BRANCH: docspreview/pr-${{ github.event.pull_request.number }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Preview readmes
run: |
python -m pip install --upgrade pip
pip install -r testing-requirements.txt
make readme-preview
- name: Push readmes to a separate branch
id: push_readmes
run: |
git fetch origin
git config user.name github-actions
git config user.email github-actions@github.com
git checkout ${BRANCH} || git switch --orphan ${BRANCH}
mv README.html collection-readme.html
mv roles/tas_single_node/README.html role-readme.html
git add collection-readme.html role-readme.html
git commit --allow-empty -m "Update generated docs"
if [ -z "$(git show --format='')" ]; then exit 0; fi
echo "changed=true" >> $GITHUB_OUTPUT
git push --set-upstream origin ${BRANCH}
- uses: mshick/add-pr-comment@v2
if: steps.push_readmes.outputs.changed == 'true'
with:
allow-repeats: true
message: |
Hi :wave: here are your HTML README previews:
* [Collection readme preview](https://html-preview.github.io/?url=https://raw.githubusercontent.com/securesign/artifact-signer-ansible/refs/heads/${{ env.BRANCH }}/collection-readme.html)
* [Role readme preview](https://html-preview.github.io/?url=https://raw.githubusercontent.com/securesign/artifact-signer-ansible/refs/heads/${{ env.BRANCH }}/role-readme.html)