-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
40 lines (38 loc) · 1.3 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: 'Purge cache existing in jsDelivr Network'
author: 'PiQuark6046 and contributors'
description: 'Clone your npm package into jsDelivr Network to enhance transmission speed'
inputs:
package:
description: 'The package name to be purged'
required: true
default: ''
disttag:
description: 'The dist-tag to be purged'
required: true
default: 'latest'
runs:
using: 'composite'
steps:
- name: Install npm packages
run: |
npm i
shell: bash
working-directory: ${{ github.action_path }}
- name: Run program
env:
GITHUB_TOKEN: ${{ github.token }}
PACKAGE: ${{ inputs.package }}
DISTTAG: ${{ inputs.disttag }}
CI_WORKSPACE_PATH: ${{ github.workspace }}
CI_ACTION_PATH: ${{ github.action_path }}
WORKFLOWREF: ${{ github.workflow_ref }}
REPO: ${{ github.repository }}
run: |
npm run ci -- --gh-token "$GITHUB_TOKEN" --package "$PACKAGE" --dist-tag "$DISTTAG" --workflow-ref "$WORKFLOWREF" --ci-workspace-path "$CI_WORKSPACE_PATH" --ci-action-path "$CI_ACTION_PATH" --repo "$REPO"
shell: bash
working-directory: ${{ github.action_path }}
- name: Remember the dist tag data
uses: actions/upload-artifact@v4
with:
name: dist-tag
path: /tmp/dist-tag.json