From ad80f8cdd93782df63838d3de261ffc4260851b1 Mon Sep 17 00:00:00 2001 From: 93Boy Date: Wed, 24 Jul 2024 22:31:54 +0200 Subject: [PATCH] Create archive_toothing.yml --- .github/workflows/archive_toothing.yml | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/archive_toothing.yml diff --git a/.github/workflows/archive_toothing.yml b/.github/workflows/archive_toothing.yml new file mode 100644 index 00000000..7443fa71 --- /dev/null +++ b/.github/workflows/archive_toothing.yml @@ -0,0 +1,38 @@ +name: Archive Tooting + +on: + pull_request: + types: [closed] + workflow_dispatch: #manual triggering + +jobs: + if_merged: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + pip install requests + + - name: Construct diff URL + id: construct_diff_url + run: | + echo "https://patch-diff.githubusercontent.com/raw/poseidon-framework/community-archive/pull/184.diff" > diff_url.txt + + - name: Fetch PR diff + run: | + curl -L $(cat diff_url.txt) -o diff.txt + + - name: Run parse_diff.py + run: | + python3 parse_diff.py < diff.txt + + - name: Print output + run: cat diff.txt