-
-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (39 loc) · 1.41 KB
/
update-release-metadata.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
name: Update Release Metadata
on:
schedule:
- cron: '0 1 * * *'
permissions:
contents: write
jobs:
update-release:
name: Update release metadata
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Fetch the latest release data
id: fetch_release
run: |
npx dotenv-vault@latest pull development -y --dotenvMe=${{ secrets.VAULT_TOKEN }}
source .env
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${TOKEN_VALHALLA}" \
https://api.github.com/repos/${{ github.repository }}/releases/latest \
-o $GITHUB_WORKSPACE/release_metadata.json
- name: Setup Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Commit and push changes
run: |
npx dotenv-vault@latest pull development -y --dotenvMe=${{ secrets.VAULT_TOKEN }}
source .env
git add $GITHUB_WORKSPACE/release_metadata.json
git commit -m "Update release metadata"
git remote set-url origin https://x-access-token:${TOKEN_VALHALLA}@github.com/${{ github.repository }}.git
git push origin main