-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.14 KB
/
generate-timestamp.yaml
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
name: Generate a signed timestamp
on:
workflow_dispatch:
schedule:
- cron: '0 */6 * * *'
jobs:
generate-timestamp:
runs-on: ubuntu-latest
steps:
- name: Checkout scalar-licensing repo
uses: actions/checkout@v3
with:
repository: scalar-labs/scalar-licensing
token: ${{ secrets.GH_PAT }}
- name: Setup and execute Gradle 'installDist' task
uses: gradle/gradle-build-action@v2
with:
arguments: installDist
- name: Generate a signed timestamp
run: |
echo "${{ secrets.TRIAL_SIGNING_PRIVATE_KEY_PEM }}" > $HOME/private-key.pem
lib/build/install/lib/bin/generate-signed-timestamp --private-key-file=$HOME/private-key.pem > $HOME/timestamp.json
- name: Checkout this repo
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT }}
- name: Commit the timestamp
run: |
cp $HOME/timestamp.json .
git config user.name github-actions
git config user.email [email protected]
git add .
git commit --amend -m "Update the timestamp"
git push -f