Create T1622.yaml (#2752) #737
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: generate-docs | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
generate-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PROTECTED_BRANCH_PUSH_TOKEN }} | |
- name: setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
bundler-cache: true | |
- name: generate markdown docs for atomics | |
run: | | |
bin/generate-atomic-docs.rb | |
echo "" | |
echo "" | |
git status | |
echo "" | |
echo "" | |
git diff-index HEAD -- | |
if git diff-index --quiet HEAD -- ; then | |
echo "Not committing documentation because there are no changes" | |
else | |
git config credential.helper 'cache --timeout=120' | |
git config user.email "[email protected]" | |
git config user.name "Atomic Red Team doc generator" | |
git add atomics | |
git commit -am "Generated docs from job=$GITHUB_JOB branch=$GITHUB_REF_NAME [ci skip]" | |
git push origin $GITHUB_REF_NAME -f | |
fi |