From 469324f39fc0b20545dd9af6c013ab5cff277612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M=C2=AA=20Fern=C3=A1ndez?= Date: Fri, 20 Sep 2024 15:18:43 +0200 Subject: [PATCH] Added new GitHub CI workflow which is only run when a new tag is applied. This workflow creates a pull request against readthedocs_merge branch, in order to update the version of WfExS being documented. --- .github/workflows/update-documented-wfexs.yml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/update-documented-wfexs.yml diff --git a/.github/workflows/update-documented-wfexs.yml b/.github/workflows/update-documented-wfexs.yml new file mode 100644 index 0000000..dd0e72e --- /dev/null +++ b/.github/workflows/update-documented-wfexs.yml @@ -0,0 +1,35 @@ +name: Create a pull request against readthedocs_merge branch updating the tag being pulled +on: + workflow_dispatch: + push: + tags: + # Push events to every tag not containing / + # based on https://stackoverflow.com/a/61892639 + - '[1-9]*' + +jobs: + update_wfexs_requirement_at_readthedocs_merge: + runs-on: ubuntu-latest + steps: + - name: Documentation branch checkout + uses: actions/checkout@v4 + with: + ref: readthedocs_merge + - name: Write requirement + run: | + echo "wfexs_backend @ git+${{ github.server_url }}/${{ github.repository }}.git@${{ github.ref_name }}" > docs/source/requirement-wfexs.txt + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v7 + with: + title: Updated WfExS-backend version being documented to ${{ github.ref_name }} + add-paths: | + docs/source/requirement-wfexs.txt + branch: create-pull-request/patch-documented-wfexs-version + delete-branch: true + commit-message: "[create-pull-request] Automatically commit updated contents (changed referred WfExS version to ${{ github.ref_name }})" + - name: Check outputs + if: ${{ steps.cpr.outputs.pull-request-number }} + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"