From 29a047aa12b6c270065718c6ce36dd951a352853 Mon Sep 17 00:00:00 2001 From: MarketingPip <86180097+MarketingPip@users.noreply.github.com> Date: Thu, 10 Nov 2022 03:45:17 -0500 Subject: [PATCH] Create delete.yaml --- .github/workflows/delete.yaml | 102 ++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/delete.yaml diff --git a/.github/workflows/delete.yaml b/.github/workflows/delete.yaml new file mode 100644 index 0000000..c5beece --- /dev/null +++ b/.github/workflows/delete.yaml @@ -0,0 +1,102 @@ +name: Repo Generator + +on: + workflow_dispatch: + inputs: + Replace_Links_In_Markdown: + description: 'Update all links' + type: boolean + required: false + Update_Code_Of_Conduct_EMAIL: + description: 'Update Code Of Conduct Email' + type: boolean + required: false + Generate_Table_Of_Contents: + description: 'Generate Table Of Contents' + type: boolean + required: false + Generate_Metrics_File: + description: 'Generate Metrics Image File' + type: boolean + required: false + + +jobs: + test_job: + name: Test + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + ### Update links in README file + - name: Updating links in README content + if: ${{ github.event.inputs.Replace_Links_In_Markdown == 'true' }} + run: | + sudo apt-get install python3 python3-pip + pip3 install html2image + python3 .github/py_repo_tools/replace_repo_links.py + + + ### Metric Images + + - name: Generating Metrics Image + if: ${{ github.event.inputs.Generate_Metrics_File == 'true' }} + uses: lowlighter/metrics@v3.24 + with: + filename: stargazers-metrics.svg + filepath: /.github/ + plugin_stargazers_charts_type: chartist + token: ${{ secrets.METRICS_TOKEN }} + + + + base: "" + + config_octicon: yes + + plugin_stargazers: yes + plugin_contributors: yes + + + ## - name: Move Metrics Image + + # if: ${{ github.event.inputs.Generate_Metrics_File == 'true' }} + + # run: | + # git mv -f ~/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/metrics.plugin.stargazers.svg ~/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/.github + + + ### Table Of Contents + - name: Generating Table Of Contents + if: ${{ github.event.inputs.Generate_Table_Of_Contents == 'true' }} + run: | # To optimize images simply run this + git push --delete origin v1.0.0 + + + ### Replace COC E-mail + - name: Updating Code Of Conduct E-Mail + if: ${{ github.event.inputs.Update_Code_Of_Conduct_EMAIL == 'true' }} + run: | + sudo apt-get install python3 python3-pip + pip3 install bleach + python3 .github/py_repo_tools/generate_index_file.py + ### Commit updates (if any) + - name: Commiting updates + if: ${{ github.event.inputs.Update_Code_Of_Conduct_EMAIL == 'true' }} + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add -A + git commit -m "Updated Code Of Conduct Email" + git push + + + - name: Commiting updates + if: ${{ github.event.inputs.Replace_Links_In_Markdown == 'true' }} + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add -A + git commit -m "Updated README links" + git push + +