Skip to content

Commit

Permalink
Added new GitHub CI workflow which is only run when a new tag is appl…
Browse files Browse the repository at this point in the history
…ied.

This workflow creates a pull request against readthedocs_merge branch, in order to update the version of WfExS being documented.
  • Loading branch information
jmfernandez committed Sep 20, 2024
1 parent 7b39803 commit 469324f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/update-documented-wfexs.yml
Original file line number Diff line number Diff line change
@@ -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 }}"

0 comments on commit 469324f

Please sign in to comment.