Skip to content

Update Release Metadata #36

Update Release Metadata

Update Release Metadata #36

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