From f2f964f296da6c83313ead5f3c62d1a63de820f0 Mon Sep 17 00:00:00 2001 From: Lars Buntemeyer Date: Fri, 9 Aug 2024 13:59:12 +0200 Subject: [PATCH] added pr workflow --- .github/workflows/cmor-tables.yaml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cmor-tables.yaml b/.github/workflows/cmor-tables.yaml index a81fc82..da232b7 100644 --- a/.github/workflows/cmor-tables.yaml +++ b/.github/workflows/cmor-tables.yaml @@ -1,7 +1,5 @@ name: cmor tables -# Controls when the action will run. Workflow runs when manually triggered using the UI -# or API. on: workflow_dispatch: @@ -9,16 +7,13 @@ on: paths: - 'docs/data-request-i4c-merged.csv' branches: - - "*" + - 'main' - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: update-cmor-tables: - # The type of runner that the job will run on runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job + permissions: + pull-requests: write steps: - name: checkout uses: actions/checkout@v4 @@ -34,4 +29,17 @@ jobs: - name: Create tables run: | - create-cmor-tables docs/data-request-i4c-merged.csv --coords --output cmor-tables + create-cmor-tables docs/data-request-i4c-merged.csv --coords --output cmor-tables + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + commit-message: update cmor tables + title: Update CMOR tables + body: | + Updates cmor tables + + Auto-generated by [create-pull-request][1] + + [1]: https://github.com/peter-evans/create-pull-request + branch: cmor-tables-updates