diff --git a/.github/actions/download-artifact/action.yaml b/.github/actions/download-artifact/action.yaml deleted file mode 100644 index 15b3f25e7..000000000 --- a/.github/actions/download-artifact/action.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: 'Download artifact from another workflow in a workflow triggered by workflow_run' -inputs: - artifact_name: - required: true - type: string - default: 'emqx-source' - archive_format: - required: false - type: string - default: 'zip' - -defaults: - run: - shell: 'bash -Eeuo pipefail {0}' - -runs: - using: composite - steps: - - name: Download 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: '${{ inputs.archive_format }}', - }); - let fs = require('fs'); - fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/data.zip`, Buffer.from(download.data)); - - name: Unzip artifact - shell: bash - run: unzip -o -q data.zip diff --git a/.github/workflows/_pr_entrypoint.yaml b/.github/workflows/_pr_entrypoint.yaml index a1ae4ce15..70b62bcc1 100644 --- a/.github/workflows/_pr_entrypoint.yaml +++ b/.github/workflows/_pr_entrypoint.yaml @@ -13,9 +13,3 @@ jobs: with: fetch-depth: 0 - uses: ./.github/actions/pr-sanity-checks - - uses: actions/upload-artifact@v3 - with: - name: emqx-source - path: . - retention-days: 1 - diff --git a/.github/workflows/apps_version_check.yaml b/.github/workflows/apps_version_check.yaml index a0d445f98..196503b35 100644 --- a/.github/workflows/apps_version_check.yaml +++ b/.github/workflows/apps_version_check.yaml @@ -13,6 +13,6 @@ jobs: if: github.event.workflow_run.conclusion == 'success' steps: - - uses: ./.github/actions/download-artifact + - uses: actions/checkout@v3 - name: Check apps version run: ./scripts/apps-version-check.sh