From a9ba1fe7e1bec82bd6c940743c7bacb6af4212ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Thu, 18 Jan 2024 08:50:31 +0100 Subject: [PATCH] fix(actions): move github.workspace out of compile init step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- .github/workflows/command-compile.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/command-compile.yml b/.github/workflows/command-compile.yml index 48a4152b6d83a..8c0fbbc6be1b1 100644 --- a/.github/workflows/command-compile.yml +++ b/.github/workflows/command-compile.yml @@ -39,9 +39,9 @@ jobs: id: git-path run: | if ${{ startsWith(steps.command.outputs.arg1, '/') }}; then - echo "path=${{ github.workspace }}${{steps.command.outputs.arg1}}" >> $GITHUB_OUTPUT + echo "path=${{steps.command.outputs.arg1}}" >> $GITHUB_OUTPUT else - echo "path=${{ github.workspace }}${{steps.command.outputs.arg2}}" >> $GITHUB_OUTPUT + echo "path=${{steps.command.outputs.arg2}}" >> $GITHUB_OUTPUT fi - name: Init branch @@ -54,13 +54,13 @@ jobs: steps: - name: Restore cached git repository - uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 + uses: buildjet/cache@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3 with: path: .git key: git-repo - name: Checkout ${{ needs.init.outputs.head_ref }} - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.6.0 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: token: ${{ secrets.COMMAND_BOT_PAT }} fetch-depth: 0 @@ -79,7 +79,7 @@ jobs: fallbackNpm: '^9' - name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3 with: node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }} cache: npm @@ -98,21 +98,21 @@ jobs: - name: Commit and push default if: ${{ needs.init.outputs.arg1 != 'fixup' && needs.init.outputs.arg1 != 'amend' }} run: | - git add ${{ needs.init.outputs.git_path }} + git add ${{ github.workspace }}${{ needs.init.outputs.git_path }} git commit --signoff -m 'chore(assets): Recompile assets' git push origin ${{ needs.init.outputs.head_ref }} - name: Commit and push fixup if: ${{ needs.init.outputs.arg1 == 'fixup' }} run: | - git add ${{ needs.init.outputs.git_path }} + git add ${{ github.workspace }}${{ needs.init.outputs.git_path }} git commit --fixup=HEAD --signoff git push origin ${{ needs.init.outputs.head_ref }} - name: Commit and push amend if: ${{ needs.init.outputs.arg1 == 'amend' }} run: | - git add ${{ needs.init.outputs.git_path }} + git add ${{ github.workspace }}${{ needs.init.outputs.git_path }} git commit --amend --no-edit --signoff git push --force origin ${{ needs.init.outputs.head_ref }}