Skip to content

Commit

Permalink
Replace the docstrings_common.json file here with the one from opm-co…
Browse files Browse the repository at this point in the history
…mmon if the one in opm-common is changed

This is done on an event triggered by opm-common
  • Loading branch information
lisajulia committed Jun 25, 2024
1 parent a844264 commit edbd673
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/get_docstrings_common.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit edbd673

Please sign in to comment.