From 9836554810231358761dd34a5002c28f583fa0cf Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Tue, 29 Oct 2024 15:34:45 -0600 Subject: [PATCH] add git status for troubleshooting --- .github/actions/commit_and_push/README.md | 23 ++++++++++++++++++++++ .github/actions/commit_and_push/action.yml | 4 ++++ .github/workflows/release_parallel.yml | 4 ---- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 .github/actions/commit_and_push/README.md diff --git a/.github/actions/commit_and_push/README.md b/.github/actions/commit_and_push/README.md new file mode 100644 index 0000000000..96338cdb57 --- /dev/null +++ b/.github/actions/commit_and_push/README.md @@ -0,0 +1,23 @@ +## Prerequisite + +This action assumes that the repository has already been checked out before +calling the action, typically using `actions/checkout@v4`. If you have not +checked out the code in a previous step, make sure to do so to avoid errors. + +This action does **not** perform a checkout action itself because it would be +redundant. This action is part of the repository's codebase, so if the code +hasn't already been checked out, the action itself wouldn't even be available to +call. + +## Example Usage + +```yaml +steps: + - uses: actions/checkout@v4 + + - uses: ./.github/actions/commit_and_push + with: + gpg_signing_key: ${{ secrets.GPG_SIGNING_KEY }} + branch-name: 'branch-name' + commit-message: 'commit message' +``` diff --git a/.github/actions/commit_and_push/action.yml b/.github/actions/commit_and_push/action.yml index 41c7589529..b160cde5b1 100644 --- a/.github/actions/commit_and_push/action.yml +++ b/.github/actions/commit_and_push/action.yml @@ -23,6 +23,10 @@ runs: # Create and switch to new branch git switch -c "${{ inputs.branch-name }}" + # Show status of working directory + echo "Current git status:" + git status + # Add and commit changes if there are any git add --all if ! git diff --cached --quiet; then diff --git a/.github/workflows/release_parallel.yml b/.github/workflows/release_parallel.yml index 8aa155a023..0fdd3a05bc 100644 --- a/.github/workflows/release_parallel.yml +++ b/.github/workflows/release_parallel.yml @@ -46,10 +46,6 @@ jobs: run: | AZLE_VERBOSE=true npx azle install-global-dependencies --rust --wasi2ic - - uses: ./.github/actions/configure_git - with: - gpg_signing_key: ${{ secrets.GPG_SIGNING_KEY }} - - name: Update version and build templates run: | VERSION=${{ steps.get-version.outputs.release-version }}