61733d1e90
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
62 lines
1.9 KiB
YAML
62 lines
1.9 KiB
YAML
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 and commit unique GUIDs for each atomic test
|
|
run: |
|
|
bin/generate-guids.rb
|
|
|
|
echo ""
|
|
echo ""
|
|
git status
|
|
echo ""
|
|
echo ""
|
|
git diff-index HEAD --
|
|
|
|
if git diff-index --quiet HEAD -- ; then
|
|
echo "Not committing GUID changes because there are no changes"
|
|
else
|
|
git config credential.helper 'cache --timeout=120'
|
|
git config user.email "opensource@redcanary.com"
|
|
git config user.name "Atomic Red Team GUID generator"
|
|
git add atomics
|
|
git commit -am "Generate GUIDs from job=$GITHUB_JOB branch=$GITHUB_REF_NAME [skip ci]"
|
|
git push origin $GITHUB_REF_NAME -f
|
|
fi
|
|
|
|
- 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 "opensource@redcanary.com"
|
|
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
|