From d6598ebbfea635f28b7a31e2e17bd28ef12d2471 Mon Sep 17 00:00:00 2001 From: Tarik Demirovic Date: Fri, 5 Apr 2024 15:41:39 +0200 Subject: [PATCH] Push changes instead of upload-artifact --- .github/workflows/check-dist.yaml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check-dist.yaml b/.github/workflows/check-dist.yaml index 4481824..82c5f6c 100644 --- a/.github/workflows/check-dist.yaml +++ b/.github/workflows/check-dist.yaml @@ -8,10 +8,10 @@ name: Check dist on: push: - branches: - - master - paths-ignore: - - '**.md' + # branches: + # - master + # paths-ignore: + # - '**.md' pull_request: paths-ignore: - '**.md' @@ -44,9 +44,12 @@ jobs: exit 1 fi - # If dist/ was different than expected, upload the expected version as an artifact - - uses: actions/upload-artifact@v2 - if: ${{ failure() && steps.diff.outcome == 'failure' }} - with: - name: dist - path: dist/ + # If dist/ was different than expected, push the changes + - if: ${{ failure() && steps.diff.outcome == 'failure' }} + run: | + git config user.name "GitHub Actions" + git config user.email "<>" + + git add dist + git commit -m "Build new dist/index.js" + git push origin ${GITHUB_HEAD_REF}