-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (55 loc) · 1.58 KB
/
renovate-release-json.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Fetch Releases and Generate JSON
on:
push:
branches:
- main
- master
workflow_dispatch:
jobs:
generate-json:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: "Setup Go Env"
uses: "actions/setup-go@v4"
with:
cache: true
go-version: "1.23.2"
- name: Generate JSON File
run: |
go run renovate.go
- name: "Ensure Private Key"
env:
BOT_SSH_KEY: '${{ secrets.BOT_SSH_KEY }}'
run: |
echo "$BOT_SSH_KEY" > /tmp/id_ed25519
- name: "Setup SSH Agent"
env:
SSH_AUTH_SOCK: "/tmp/ssh_agent.sock"
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-agent -a ${SSH_AUTH_SOCK} > /dev/null
chmod 0600 /tmp/id_ed25519
ssh-add /tmp/id_ed25519
- name: "Setup Git Config"
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git remote set-url origin [email protected]:${GITHUB_REPOSITORY}.git
- name: "Commit And Push"
env:
SSH_AUTH_SOCK: "/tmp/ssh_agent.sock"
run: |
if [[ $(git status --porcelain) ]]; then
git add */*.json
git commit -m "Update releases.json"
git push
fi
- name: "Cleanup Build Container"
env:
SSH_AUTH_SOCK: "/tmp/ssh_agent.sock"
run: |
ssh-add -D
rm -Rf *