From d828cd3ea45575301e314a6eff1d709646005418 Mon Sep 17 00:00:00 2001 From: nikosbosse Date: Wed, 20 Dec 2023 10:13:10 +0100 Subject: [PATCH] copy render readme action from epinowcast --- .github/workflows/render_readme.yaml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/render_readme.yaml b/.github/workflows/render_readme.yaml index f1857c969..d629c74c7 100644 --- a/.github/workflows/render_readme.yaml +++ b/.github/workflows/render_readme.yaml @@ -1,10 +1,8 @@ -# Name of the workflow name: render-readme -# Controls when the action will run. Triggers include: -# -# - button trigger from github action page -# - on changes to readme.Rmd +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true on: workflow_dispatch: @@ -13,11 +11,6 @@ on: - 'README.Rmd' - DESCRIPTION -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: render-readme: runs-on: macos-latest @@ -25,7 +18,7 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout repos - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup R uses: r-lib/actions/setup-r@v2 @@ -47,6 +40,6 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add README.md man/figures - git diff-index --quiet HEAD || git commit -m "Automatic readme update" - git status -sb | grep -q ahead && git push origin + git add README.md man/figures/ + git diff-index --quiet HEAD || git commit -m "Automatic readme update [ci skip]" + git push origin || echo "No changes to push"