Skip to content

fix missing field for release version (#1506) #168

fix missing field for release version (#1506)

fix missing field for release version (#1506) #168

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 *