-
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (87 loc) · 3.27 KB
/
test.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: 'build-test'
on:
pull_request:
push:
branches:
- main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- run: |
npm i
- run: |
npm run build
- name: update a value
id: run_id
uses: ./
with:
storage-commit-sha: 13ef52e3a407d9828741990d69dded5a2b65f563
key: run_id
value: ${{ github.run_id }}
- name: update a value (result)
run: |
echo "value: ${{ steps.run_id.outputs.value }}, updated: ${{ steps.run_id.outputs.updated }}"
test ${{ steps.run_id.outputs.updated }} = true
- name: indicate if not updated
id: identical_run_id
uses: ./
with:
storage-commit-sha: 13ef52e3a407d9828741990d69dded5a2b65f563
key: run_id
value: ${{ github.run_id }}
- name: indicate if not updated (result)
run: |
echo "value: ${{ steps.identical_run_id.outputs.value }}, updated: ${{ steps.identical_run_id.outputs.updated }}"
test ${{ steps.identical_run_id.outputs.updated }} = false
- name: set
id: set
uses: ./
with:
storage-commit-sha: 13ef52e3a407d9828741990d69dded5a2b65f563
key: some
value: content
- name: set (result)
run: |
echo "value: ${{ steps.set.outputs.value }}, updated: ${{ steps.set.outputs.updated }}"
test ${{ steps.set.outputs.value }} = content
- name: get
id: get
uses: ./
with:
storage-commit-sha: 13ef52e3a407d9828741990d69dded5a2b65f563
key: some
- name: get (result)
run: |
echo "value: ${{ steps.get.outputs.value }}, updated: ${{ steps.get.outputs.updated }}"
test ${{ steps.get.outputs.updated }} = false
test ${{ steps.get.outputs.value }} = content
- name: set encrypted
id: set_encrypted
uses: ./
with:
storage-commit-sha: e4c2d3e3d0d865a0ffdfb017e25eb7b59117894e
encryption-key: e761daf732c272ee0db9bd71f49c66a0
key: some
value: secretive content
- name: set encrypted (result)
run: |
echo "value: ${{ steps.set_encrypted.outputs.value }}, updated: ${{ steps.set_encrypted.outputs.updated }}, encrypted: ${{ steps.set_encrypted.outputs.encrypted }}"
test "${{ steps.set_encrypted.outputs.value }}" = "secretive content"
test "${{ steps.set_encrypted.outputs.encrypted }}" = "true"
- name: get encrypted
id: get_encrypted
uses: ./
with:
storage-commit-sha: e4c2d3e3d0d865a0ffdfb017e25eb7b59117894e
encryption-key: e761daf732c272ee0db9bd71f49c66a0
key: some
- name: get encrypted (result)
run: |
echo "value: ${{ steps.get_encrypted.outputs.value }}, updated: ${{ steps.get_encrypted.outputs.updated }}, encrypted: ${{ steps.get_encrypted.outputs.encrypted }}"
test ${{ steps.get_encrypted.outputs.updated }} = false
test "${{ steps.set_encrypted.outputs.encrypted }}" = "true"
test "${{ steps.get_encrypted.outputs.value }}" = "secretive content"