diff --git a/.github/actions/update-generated-files/action.yaml b/.github/actions/update-generated-files/action.yaml deleted file mode 100644 index b782339d..00000000 --- a/.github/actions/update-generated-files/action.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: update-generated-files -description: push if there is changed file(s) -runs: - using: composite - steps: - - shell: bash - run: ${{ github.action_path }}/run.sh diff --git a/.github/actions/update-generated-files/run.sh b/.github/actions/update-generated-files/run.sh deleted file mode 100755 index 4a981ff3..00000000 --- a/.github/actions/update-generated-files/run.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -o pipefail -set -eux - -status="$(git status --porcelain)" -if [ -z "$status" ]; then - exit 0 -fi - -if [[ ${GITHUB_EVENT_NAME} != pull_request ]]; then - : ERROR: need to regenerate files manually - exit 1 -fi - -git config user.name 'github-actions[bot]' -git config user.email '41898282+github-actions[bot]@users.noreply.github.com' -git add . -git status -git commit -m update-generated-files -git push origin "${GITHUB_HEAD_REF}" diff --git a/.github/workflows/hello-world.yaml b/.github/workflows/hello-world.yaml index 140dee2a..dadf622b 100644 --- a/.github/workflows/hello-world.yaml +++ b/.github/workflows/hello-world.yaml @@ -31,11 +31,10 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - run: yarn - - run: yarn format-check - run: yarn lint - run: yarn test - build: + generate: runs-on: ubuntu-latest defaults: run: @@ -53,12 +52,13 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - run: yarn + - run: yarn format - run: yarn build - run: yarn package - - uses: ./.github/actions/update-generated-files + - uses: int128/update-generated-files-action@main e2e-test: - needs: [build] + needs: [generate] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2