diff --git a/.github/actions/download-workflow-run-artifact/action.yml b/.github/actions/download-workflow-run-artifact/action.yml index 0af5d031e..93b82c413 100644 --- a/.github/actions/download-workflow-run-artifact/action.yml +++ b/.github/actions/download-workflow-run-artifact/action.yml @@ -11,34 +11,35 @@ runs: using: "composite" steps: - run: echo Hello ${{ inputs.who-to-greet }}. + # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run - - name: 'Download render-test-result artifact' - uses: actions/github-script@v6 - with: - script: | - let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: context.payload.workflow_run.id, - }); - let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { - return artifact.name == ${{ inputs.artifact-name }} - })[0]; - let download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - let fs = require('fs'); - fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/${{ inputs.artifact-name }}.zip`, Buffer.from(download.data)); + - name: 'Download render-test-result artifact' + uses: actions/github-script@v6 + with: + script: | + let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.payload.workflow_run.id, + }); + let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { + return artifact.name == ${{ inputs.artifact-name }} + })[0]; + let download = await github.rest.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: matchArtifact.id, + archive_format: 'zip', + }); + let fs = require('fs'); + fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/${{ inputs.artifact-name }}.zip`, Buffer.from(download.data)); - - name: Unzip artifact - run: unzip ${{ inputs.artifact-name }}.zip + - name: Unzip artifact + run: unzip ${{ inputs.artifact-name }}.zip - - name: "Check file existence" - uses: andstor/file-existence-action@v2.0.0 - if: ${{ inputs.expect-files }} - with: - fail: true - files: ${{ inputs.expect-files }} \ No newline at end of file + - name: "Check file existence" + uses: andstor/file-existence-action@v2.0.0 + if: ${{ inputs.expect-files }} + with: + fail: true + files: ${{ inputs.expect-files }} \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ab1e58fe3..42c581ee2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,8 @@ repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-yaml - repo: https://github.com/pre-commit/mirrors-clang-format rev: v16.0.6 hooks: