ci: no upload/download, too slow

This commit is contained in:
Ivan Dyachkov 2023-07-19 12:05:22 +02:00
parent 1566edd50c
commit 1943120937
3 changed files with 1 additions and 48 deletions

View File

@ -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

View File

@ -13,9 +13,3 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: ./.github/actions/pr-sanity-checks - uses: ./.github/actions/pr-sanity-checks
- uses: actions/upload-artifact@v3
with:
name: emqx-source
path: .
retention-days: 1

View File

@ -13,6 +13,6 @@ jobs:
if: github.event.workflow_run.conclusion == 'success' if: github.event.workflow_run.conclusion == 'success'
steps: steps:
- uses: ./.github/actions/download-artifact - uses: actions/checkout@v3
- name: Check apps version - name: Check apps version
run: ./scripts/apps-version-check.sh run: ./scripts/apps-version-check.sh