From 69015193b68a43832b649748e0eee9cdbf182ed6 Mon Sep 17 00:00:00 2001 From: Yuta Matsumura Date: Sun, 30 Jul 2023 20:45:38 +0900 Subject: [PATCH] update github-repository-commit.yml --- .github/workflows/github-repository-commit.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github-repository-commit.yml b/.github/workflows/github-repository-commit.yml index 1c62741..97b0aaa 100644 --- a/.github/workflows/github-repository-commit.yml +++ b/.github/workflows/github-repository-commit.yml @@ -30,20 +30,21 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Edit a file + if: github.event.inputs.edit + run: | + echo -e "\n" >> README.md + date >> README.md - name: Prepare a branch, and file id: commit-step run: | - if "${{ github.event.inputs.edit }}"; then - echo -e "\n" >> README.md - date >> README.md - fi git checkout -b $HEAD_BRANCH git config user.name github-actions[bot] git config user.email 41898282+github-actions[bot]@users.noreply.github.com git add . git commit -m "Add date to README.md" git push --set-upstream origin $HEAD_BRANCH - # git checkout main + git checkout $BASE_BRANCH echo "base-branch-name: $BASE_BRANCH" echo "base-branch-name=$BASE_BRANCH" >> $GITHUB_OUTPUT echo "head-branch-name: $HEAD_BRANCH"