2022-03-24 14:46:42 -04:00
|
|
|
---
|
|
|
|
##############################
|
|
|
|
##############################
|
|
|
|
## Repository Visualization ##
|
|
|
|
##############################
|
|
|
|
##############################
|
|
|
|
|
|
|
|
#
|
|
|
|
# Documentation:
|
|
|
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
|
|
|
#
|
|
|
|
|
|
|
|
name: Repository Visualization
|
|
|
|
###########################################
|
|
|
|
# Start the job on all push or PR to main #
|
|
|
|
###########################################
|
|
|
|
on:
|
2022-03-25 09:56:31 -04:00
|
|
|
schedule:
|
|
|
|
# Sunday at 5:00pm
|
|
|
|
- cron: "0 17 * * 0"
|
2022-03-24 14:46:42 -04:00
|
|
|
|
|
|
|
###############
|
|
|
|
# Set the Job #
|
|
|
|
###############
|
2022-04-11 15:52:49 -04:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-03-24 14:46:42 -04:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
# Name the Job
|
|
|
|
name: Repository Visualization
|
|
|
|
# Set the agent to run on
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 60
|
|
|
|
|
|
|
|
###############
|
|
|
|
# Steps below #
|
|
|
|
###############
|
|
|
|
steps:
|
|
|
|
############################
|
|
|
|
# Checkout the source code #
|
|
|
|
############################
|
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
##############################
|
|
|
|
# Create Visualization Files #
|
|
|
|
##############################
|
|
|
|
- name: Create Visualization
|
2022-04-20 13:29:07 -04:00
|
|
|
uses: githubocto/repo-visualizer@0.8.2
|
2022-03-24 14:46:42 -04:00
|
|
|
with:
|
|
|
|
output_file: "./diagram.svg"
|
|
|
|
should_push: false
|
|
|
|
|
|
|
|
###########################
|
|
|
|
# Configure the AWS creds #
|
|
|
|
###########################
|
|
|
|
- name: Configure AWS Credentials
|
|
|
|
if: success()
|
|
|
|
uses: aws-actions/configure-aws-credentials@v1
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
|
|
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
|
|
|
|
aws-region: ${{ secrets.AWS_REGION }}
|
|
|
|
|
|
|
|
############################
|
|
|
|
# Push the image to aws s3 #
|
|
|
|
############################
|
|
|
|
- name: Push diagram to s3
|
|
|
|
if: success()
|
|
|
|
run: aws s3 cp diagram.svg s3://super-linter/diagram.svg
|