-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(listing): fix workflow and logo URI
- Loading branch information
1 parent
53541cc
commit 2cbd606
Showing
5 changed files
with
77 additions
and
53 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 |
---|---|---|
|
@@ -3,8 +3,7 @@ name: Analyze Token | |
on: | ||
pull_request: | ||
branches: | ||
# - master | ||
- feat/telegram-bot | ||
- master | ||
|
||
jobs: | ||
analyze: | ||
|
@@ -44,17 +43,23 @@ jobs: | |
run: | | ||
npm run build | ||
- name: Configure git | ||
if: env.SKIP == 'false' | ||
run: | | ||
git config user.name "GitHub Action" | ||
git config user.email "[email protected]" | ||
- name: Commit changes | ||
if: env.SKIP == 'false' | ||
run: | | ||
git config --global user.name "GitHub Action" | ||
git config --global user.email "[email protected]" | ||
# Get the current branch name | ||
BRANCH_NAME=${GITHUB_HEAD_REF} | ||
git fetch origin $BRANCH_NAME | ||
git checkout $BRANCH_NAME | ||
git add . | ||
git commit -m "Automated build update" | ||
git push | ||
git rebase origin/$BRANCH_NAME | ||
git push origin HEAD:$BRANCH_NAME | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,56 @@ | ||
name: Notify Telegram on JSON Update | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- '**/voltage-swap-default.tokenlist.json' | ||
|
||
jobs: | ||
notify: | ||
environment: TELEGRAM | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run notify script | ||
run: npm run notify:telegram | ||
env: | ||
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | ||
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | ||
|
||
- name: Commit changes | ||
run: | | ||
git config --global user.name "GitHub Action" | ||
git config --global user.email "[email protected]" | ||
# Get the current branch name | ||
BRANCH_NAME=$(echo "${GITHUB_REF#refs/heads/}") | ||
# Check if new-token.json has been modified | ||
if git diff --name-only | grep -q "new-token.json"; then | ||
echo "A new-token.json file has been modified. Committing changes." | ||
git fetch origin $BRANCH_NAME | ||
git checkout $BRANCH_NAME | ||
git add "**/new-token.json" | ||
git commit -m "Update new-token.json file" | ||
git push origin HEAD:$BRANCH_NAME | ||
else | ||
echo "No new-token.json file has been modified. Skipping commit." | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file was deleted.
Oops, something went wrong.
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
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