From edbd6730e570cd511a9dc8b83824f52a58de259b Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Tue, 25 Jun 2024 10:50:50 +0200 Subject: [PATCH] Replace the docstrings_common.json file here with the one from opm-common if the one in opm-common is changed This is done on an event triggered by opm-common --- .github/workflows/get_docstrings_common.yaml | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/get_docstrings_common.yaml diff --git a/.github/workflows/get_docstrings_common.yaml b/.github/workflows/get_docstrings_common.yaml new file mode 100644 index 00000000000..85825974012 --- /dev/null +++ b/.github/workflows/get_docstrings_common.yaml @@ -0,0 +1,29 @@ +name: Get updated docstrings_common.json from opm-common + +on: + repository_dispatch: + types: [docstrings_common_updated] +permissions: + contents: write +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for all tags and branches + + - name: Replace docstrings_common.json file with newer version from opm-common + run: | + curl -L -o python/docstrings_common.json https://raw.githubusercontent.com/lisajulia/opm-common/python/docstrings_common.json + + - name: Commit and push changes + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add python/docstrings_common.json + git commit -m "Update file from docstrings_common.json" + git push origin HEAD:master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}