-
Notifications
You must be signed in to change notification settings - Fork 32
65 lines (54 loc) · 1.87 KB
/
minify.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Upload minified files to GCS
on:
workflow_dispatch:
inputs:
package:
type: choice
description: Select package
options:
- '@inworld/web-core'
- '@inworld/web-threejs'
version:
type: string
description: "The version of package to minify. The version should be the same as version in package.json. For example, 1.0.0. Otherwise, the latest version will be used."
required: false
env:
AUTH_SERVICE_ACCOUNT: [email protected]
AUTH_IDENTITY_PROVIDER: projects/678423885598/locations/global/workloadIdentityPools/github-devops-pool/providers/github-prvdr
TAG: ''
jobs:
minify:
runs-on: [self-hosted, linux, x64, kubernetes, ephemeral]
permissions:
contents: 'read'
id-token: 'write'
steps:
# - name: Checkout source code
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
- name: Set TAG from inputs
run: echo "TAG=refs/tags/${{ inputs.package }}@${{ inputs.version }}" >> $GITHUB_ENV
if: inputs.version != ''
- name: Set env from GITHUB_REF
run: echo "TAG=refs/tags/`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
if: inputs.version == ''
- name: Test
run: |
echo $TAG
# - name: Checkout source code
# uses: actions/checkout@v4
# with:
# ref: ${{ env.TAG }}
# fetch-tags: true
# - name: Run build
# uses: ./.github/actions/build_package
# with:
# package: ${{ inputs.package }}
# - name: Minify and upload
# uses: ./.github/actions/minify
# with:
# package: ${{ inputs.package }}
# env:
# AUTH_SERVICE_ACCOUNT: ${{ env.AUTH_SERVICE_ACCOUNT }}
# AUTH_IDENTITY_PROVIDER: ${{ env.AUTH_IDENTITY_PROVIDER }}