From 160b810987bcc5f3b7efd6ab4c7bd11089812821 Mon Sep 17 00:00:00 2001 From: I-D Bot Date: Mon, 2 Dec 2024 09:13:29 +0000 Subject: [PATCH] Remove setup files --- .github/workflows/setup.yml | 110 ------------------------------------ README.md | 13 ----- 2 files changed, 123 deletions(-) delete mode 100644 .github/workflows/setup.yml delete mode 100644 README.md diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml deleted file mode 100644 index 2987a80..0000000 --- a/.github/workflows/setup.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: "Perform Initial Repository Setup" - -on: - push: - branches: [main] - -jobs: - pre: - name: "Setup Repository" - runs-on: ubuntu-latest - outputs: - skip: ${{ steps.pre.outputs.skip }} - steps: - - name: "Checkout" - uses: actions/checkout@v4 - - - name: "Precondition Check" - id: pre - run: | - if ! ls draft-* rfc* 2>/dev/null | grep -qv draft-todo-yourname-protocol.md; then - { - echo "------------------------------------------------------------" - echo "Skipping setup for the first commit." - echo - echo "Rename draft-todo-yourname-protocol.md to start using this repository:" - echo - echo "> https://github.com/${{github.repository}}/edit/main/draft-todo-yourname-protocol.md" - echo - echo "Change the name of the file and its title." - echo "Commit the changes to the 'main' branch." - echo - echo "------------------------------------------------------------" - } >>"$GITHUB_STEP_SUMMARY" - echo "skip=true" >>"$GITHUB_OUTPUT" - elif [ ! -f draft-todo-yourname-protocol.md -a -f Makefile ]; then - { - echo "------------------------------------------------------------" - echo "Skipping setup for an already-configured repository." - echo - echo "Delete .github/workflows/setup.yml to avoid running this action:" - echo - echo "> https://github.com/${{github.repository}}/delete/main/.github/workflows/setup.yml" - echo - echo "------------------------------------------------------------" - } >>"$GITHUB_STEP_SUMMARY" - echo "skip=true" >>"$GITHUB_OUTPUT" - else - echo "skip=false" >>"$GITHUB_OUTPUT" - fi - - setup: - name: "Setup Repository" - runs-on: ubuntu-latest - needs: pre - if: ${{ needs.pre.outputs.skip != 'true' }} - permissions: - contents: write - steps: - - name: "Checkout" - uses: actions/checkout@v4 - - - name: "Git Config" - run: | - git config user.email "idbot@example.com" - git config user.name "I-D Bot" - - - name: "Update Draft Name" - run: | - for i in draft-*; do - if [ "$(head -1 "$i")" = "---" ]; then - sed -i -e '2,/^---/{/^###/,/^###/d - s|^docname: .*|docname: '"${i%.md}-latest"'| - s|^ fullname: Your Name Here| fullname: "'"$(git show -q --format='format:%aN' @)"'"| - s|^ email: your\.email@example\.com| email: "'"$(git show -q --format='format:%aE' @)"'"| - }' "$i" - fi - sed -i -e "s/draft-todo-yourname-protocol-latest/${i%.md}-latest/g" "$i" - git add "$i" - done - if [ -n "$(git status --porcelain draft-*)" ]; then - git commit -m "Update draft labels" draft-* - fi - - - name: "Cleanup" - run: | - git rm -rf .github/workflows/setup.yml README.md - git commit -m "Remove setup files" - - - name: "Clone the i-d-template Repo" - run: | - git clone --depth=1 https://github.com/martinthomson/i-d-template lib - - - name: "Run i-d-template Setup" - uses: martinthomson/i-d-template@v1 - with: - make: setup - - - name: "Update Venue Information" - uses: martinthomson/i-d-template@v1 - with: - make: update-venue - - - name: "Update GitHub Pages" - uses: martinthomson/i-d-template@v1 - with: - make: gh-pages - - - name: "Push Changes" - run: | - git push diff --git a/README.md b/README.md deleted file mode 100644 index f801b00..0000000 --- a/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Internet-Draft Template Repository - -Use this repository as a template if you want to start working on -[IETF](https://www.ietf.org/) documents. [Click here to create a new repository using the -template](https://github.com/martinthomson/internet-draft-template/generate). -Make sure to check "Include all branches", or you will need to enable GitHub Pages manually. - -[Read the -instructions](https://github.com/martinthomson/i-d-template/blob/main/doc/TEMPLATE.md) -for more information. - -Once you have created your own repository, start work by -[renaming the `draft-todo-yourname-protocol.md` file](../../edit/main/draft-todo-yourname-protocol.md).