-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Update Metadata | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
generate: | ||
name: Generate metadata | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Generate metadata.json | ||
run: | | ||
echo "{\"timestamp\": $(date +%s), \"languages\": [$(ls translations/*.lang.json | sed 's/translations\///;s/.lang.json//;s/^/"/;s/$/"/' | paste -sd,)]}" > metadata.json | ||
- name: Update metadata branch | ||
run: | | ||
git checkout --orphan metadata | ||
git rm -rf . | ||
git add metadata.json | ||
git config --global user.email "bot@eclipse.menu" | ||
git config --global user.name "Eclipse Menu Bot" | ||
git commit -m "Update metadata" | ||
git push origin metadata | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |