From de6c46cdd0bdf3232d2b132b8e1811a63620707e Mon Sep 17 00:00:00 2001 From: Matt Triff Date: Fri, 17 Dec 2021 16:40:06 -0500 Subject: [PATCH] Disable committing built files in GitHub Actions, conflicts with protected branch --- .github/workflows/build-and-test.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 3b89840..63c08ce 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,15 +32,20 @@ jobs: BUNDLESIZE_GITHUB_TOKEN: ${{secrets.BUNDLESIZE_GITHUB_TOKEN}} FORCE_COLOR: 2 HUSKY_SKIP_INSTALL: true - - name: Commit built files - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git commit -m "Update build files 🏗" -a || echo "No changes to commit" && exit 0 - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} + ## + ## Disabling for now. There does not appear to be a secure way to do this + ## with protected branches. See discussion: + ## https://github.community/t/how-to-push-to-protected-branches-in-a-github-action/16101 + ## + # - name: Commit built files + # run: | + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" + # git commit -m "Update build files 🏗" -a || echo "No changes to commit" && exit 0 + # - name: Push changes + # uses: ad-m/github-push-action@master + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} - name: Upload coverage to Codecov run: bash <(curl -s https://codecov.io/bash)