File tree 2 files changed +51
-1
lines changed
2 files changed +51
-1
lines changed Original file line number Diff line number Diff line change 5
5
- main
6
6
jobs :
7
7
example :
8
- runs-on : ubuntu-latest
8
+ strategy :
9
+ matrix :
10
+ os : [ubuntu-latest, macos-latest]
11
+ runs-on : ${{ matrix.os }}
9
12
steps :
10
13
- uses : actions/checkout@v3
11
14
- name : Setup example
Original file line number Diff line number Diff line change
1
+ name : " Publish to Github Packages"
2
+ on :
3
+ push :
4
+ tags :
5
+ - " *"
6
+ workflow_dispatch :
7
+ inputs :
8
+ tag :
9
+ description : " The existing tag to publish"
10
+ type : " string"
11
+ required : true
12
+ jobs :
13
+ publish-wasm :
14
+ runs-on : ubuntu-latest
15
+ permissions :
16
+ contents : read
17
+ packages : write
18
+ steps :
19
+ - uses : actions/checkout@v3
20
+ with :
21
+ ref : ${{ inputs.tag || github.ref_name }}
22
+ - name : Setup Fluent CI
23
+ uses : fluentci-io/setup-fluentci@v5
24
+ with :
25
+ wasm : true
26
+ plugin : rust
27
+ args : |
28
+ target_add wasm32-unknown-unknown
29
+ build --release --target wasm32-unknown-unknown
30
+ env :
31
+ GITHUB_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
+ - name : Log in to the Container registry
33
+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
34
+ with :
35
+ registry : ghcr.io
36
+ username : ${{ github.actor }}
37
+ password : ${{ secrets.GITHUB_TOKEN }}
38
+ - name : Cache wasm-to-oci
39
+ uses : actions/cache@v4
40
+ with :
41
+ path : wasm-to-oci_linux-amd64.tar.gz
42
+ key : wasm-to-oci-${{ runner.os }}
43
+ - name : Publish to the Container registry
44
+ run : |
45
+ [ -f wasm-to-oci_linux-amd64.tar.gz ] || pkgx wget https://github.com/fluentci-io/wasm-to-oci/releases/download/v0.1.2/wasm-to-oci_linux-amd64.tar.gz
46
+ tar xvf wasm-to-oci_linux-amd64.tar.gz
47
+ ./wasm-to-oci push target/wasm32-unknown-unknown/release/trufflehog.wasm ghcr.io/fluentci-io/trufflehog:${{ inputs.tag || github.ref_name }}-wasm
You can’t perform that action at this time.
0 commit comments