-
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.
docs: sync repo information with data from package.json
- Loading branch information
1 parent
9f378f8
commit a3aa389
Showing
2 changed files
with
37 additions
and
4 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,34 @@ | ||
name: Sync repository info from package.json | ||
|
||
env: | ||
GH_TOKEN: ${{ secrets.UPDATE_REPO_INFO_PAT }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- saga | ||
|
||
jobs: | ||
update_repo_info: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Currently ships with 2.3.0 which does not have repo edit | ||
- name: Update GitHub CLI | ||
run: | | ||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null | ||
sudo apt update | ||
sudo apt install gh | ||
gh --version | ||
- name: Sync repository description | ||
run: gh repo edit --description "`cat package.json | jq -r '.description'`" | ||
|
||
- name: Sync repository topics | ||
run: cat package.json | jq '.keywords[]' | xargs -I'{}' gh repo edit --add-topic {} | ||
|
||
- name: Sync homepage | ||
run: gh repo edit --homepage "`cat package.json | jq -r '.homepage'`" |
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