From d547d0347bec175a1b9886d4b00674363e6ae2db Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 14 Mar 2020 07:33:14 +0100 Subject: [PATCH] directory_writer: actions/checkout@v1 # Use v1, NOT v2 (#1799) * directory_writer: actions/checkout@v1 # Use v1, NOT v2 (#1796 * updating DIRECTORY.md --- .github/workflows/directory_writer.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/directory_writer.yml b/.github/workflows/directory_writer.yml index 0b9793b5e..77b0e1a26 100644 --- a/.github/workflows/directory_writer.yml +++ b/.github/workflows/directory_writer.yml @@ -6,17 +6,18 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v1 # v1, NOT v2 - uses: actions/setup-python@v1 with: python-version: 3.x - name: Write DIRECTORY.md run: | scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git commit -am "updating DIRECTORY.md" || true - - name: Push DIRECTORY.md - if: github.ref == 'refs/heads/master' + git config --global user.name github-actions + git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com' + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY + - name: Update DIRECTORY.md run: | - git push "https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/$GITHUB_REPOSITORY.git" ${master} --force + git add DIRECTORY.md + git commit -am "updating DIRECTORY.md" || true + git push --force origin HEAD:$GITHUB_REF || true \ No newline at end of file