-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
32 lines (32 loc) · 1.04 KB
/
action.yml
File metadata and controls
32 lines (32 loc) · 1.04 KB
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
name: 'publish oomol package'
description: 'Publish oomol package by github action workflow'
inputs:
registry:
description: 'oopnm registry url'
required: false
runs:
using: "composite"
steps:
- name: Install OIDC Client from Core Package
run: npm install @actions/core@1.11.1 @actions/http-client
shell: bash
- name: Get Id Token
uses: actions/github-script@v7
id: id_token
with:
script: |
const coredemo = require('@actions/core')
let id_token = await coredemo.getIDToken()
coredemo.setOutput('id_token', id_token)
- name: Publish Oomol Package
run: |
mkdir -p /tmp/ooomol
if [ -n "${{ inputs.registry }}" ]; then
REGISTRY_ARG="--registry ${{ inputs.registry }}"
else
REGISTRY_ARG=""
fi
oopm install --token "github-action-${{ steps.id_token.outputs.id_token }}" -d /tmp/ooomol $REGISTRY_ARG
oopm thumbnail -s /tmp/ooomol
oopm publish --token "github-action-${{ steps.id_token.outputs.id_token }}" $REGISTRY_ARG
shell: bash