From 97192692d0ff986ce942dd2b6cd485dfc22ae31a Mon Sep 17 00:00:00 2001 From: Henry Brink Date: Wed, 8 May 2024 12:29:21 +0200 Subject: [PATCH] change: checkout before commit Signed-off-by: Henry Brink --- .github/workflows/timetracking.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/timetracking.yml b/.github/workflows/timetracking.yml index 5cb4c7a..f814662 100644 --- a/.github/workflows/timetracking.yml +++ b/.github/workflows/timetracking.yml @@ -15,6 +15,13 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - uses: peterjgrainger/action-create-branch@v2.2.0 + name: 'Create a new branch' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + branch: 'actions/timetracking-${{ github.run_id }}' + sha: '${{ github.event.pull_request.head.sha }}' - name: Fetch the current timetracking data run: cd docs/project/timetracking && ./get_data.sh env: @@ -33,13 +40,6 @@ jobs: uses: EndBug/add-and-commit@v9 with: default_author: github_actions - - uses: peterjgrainger/action-create-branch@v2.2.0 - name: 'Create a new branch' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - branch: 'actions/new-timetracking-data' - sha: '${{ github.event.pull_request.head.sha }}' - name: 'Checkout the new branch' uses: actions/checkout@v4 with: