Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDEnYO committed Jul 25, 2024
1 parent c2bd064 commit 218cac5
Showing 1 changed file with 56 additions and 49 deletions.
105 changes: 56 additions & 49 deletions .github/workflows/diamondEmergencyPause.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
name: Pause PRODUCTION diamond (CAREFUL)
on:
schedule:
- cron: '0 0 * * *' # run once a day
workflow_dispatch: # enables manual trigger
push:
workflow_dispatch:
# inputs:
# testInput:
# description: 'Input'
# type: choice
# required: true
# options:
# - option1
# - option2

jobs:
diamond-emergency-pause:
Expand All @@ -11,54 +18,54 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Authenticate user
id: check_user
run: |
ALLOWED_USERS=("0xDEnYO" "maxklenk" "ezynda3")
USER=${{ github.actor }}
if [[ ! " ${ALLOWED_USERS[@]} " =~ " $USER " ]]; then
echo "User $USER is not allowed to run this workflow. Only the following users are:"
echo "$ALLOWED_USERS"
exit 1
else
echo "User $USER is allowed to run this workflow."
fi
shell: bash
# - name: Authenticate user
# id: check_user
# run: |
# ALLOWED_USERS=("0xDEnYO" "maxklenk" "ezynda3")
# USER=${{ github.actor }}
# if [[ ! " ${ALLOWED_USERS[@]} " =~ " $USER " ]]; then
# echo "User $USER is not allowed to run this workflow. Only the following users are:"
# echo "$ALLOWED_USERS"
# exit 1
# else
# echo "User $USER is allowed to run this workflow."
# fi
# shell: bash

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1

- name: Pause Diamond
run: |
./script/tasks/diamondEMERGENCYPauseGitHub.sh
env:
ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
ETH_NODE_URI_AURORA: ${{ secrets.ETH_NODE_URI_AURORA }}
ETH_NODE_URI_AVALANCHE: ${{ secrets.ETH_NODE_URI_AVALANCHE }}
ETH_NODE_URI_BASE: ${{ secrets.ETH_NODE_URI_BASE }}
ETH_NODE_URI_BLAST: ${{ secrets.ETH_NODE_URI_BLAST }}
ETH_NODE_URI_BOBA: ${{ secrets.ETH_NODE_URI_BOBA }}
ETH_NODE_URI_BSC: ${{ secrets.ETH_NODE_URI_BSC }}
ETH_NODE_URI_CELO: ${{ secrets.ETH_NODE_URI_CELO }}
ETH_NODE_URI_FANTOM: ${{ secrets.ETH_NODE_URI_FANTOM }}
ETH_NODE_URI_FRAXTAL: ${{ secrets.ETH_NODE_URI_FRAXTAL }}
ETH_NODE_URI_FUSE: ${{ secrets.ETH_NODE_URI_FUSE }}
ETH_NODE_URI_GNOSIS: ${{ secrets.ETH_NODE_URI_GNOSIS }}
ETH_NODE_URI_LINEA: ${{ secrets.ETH_NODE_URI_LINEA }}
ETH_NODE_URI_MANTLE: ${{ secrets.ETH_NODE_URI_MANTLE }}
ETH_NODE_URI_METIS: ${{ secrets.ETH_NODE_URI_METIS }}
ETH_NODE_URI_MODE: ${{ secrets.ETH_NODE_URI_MODE }}
ETH_NODE_URI_MOONBEAM: ${{ secrets.ETH_NODE_URI_MOONBEAM }}
ETH_NODE_URI_MOONRIVER: ${{ secrets.ETH_NODE_URI_MOONRIVER }}
ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
ETH_NODE_URI_POLYGONZKEVM: ${{ secrets.ETH_NODE_URI_POLYGONZKEVM }}
ETH_NODE_URI_ROOTSTOCK: ${{ secrets.ETH_NODE_URI_ROOTSTOCK }}
ETH_NODE_URI_SCROLL: ${{ secrets.ETH_NODE_URI_SCROLL }}
ETH_NODE_URI_SEI: ${{ secrets.ETH_NODE_URI_SEI }}
ETH_NODE_URI_ZKSYNC: ${{ secrets.ETH_NODE_URI_ZKSYNC }}
PRIVATE_KEY_PAUSER_WALLET: ${{ secrets.TEST_PRIV_KEY_SECRET }}
# - name: Pause Diamond
# run: |
# ./script/tasks/diamondEMERGENCYPauseGitHub.sh
# env:
# ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
# ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
# ETH_NODE_URI_AURORA: ${{ secrets.ETH_NODE_URI_AURORA }}
# ETH_NODE_URI_AVALANCHE: ${{ secrets.ETH_NODE_URI_AVALANCHE }}
# ETH_NODE_URI_BASE: ${{ secrets.ETH_NODE_URI_BASE }}
# ETH_NODE_URI_BLAST: ${{ secrets.ETH_NODE_URI_BLAST }}
# ETH_NODE_URI_BOBA: ${{ secrets.ETH_NODE_URI_BOBA }}
# ETH_NODE_URI_BSC: ${{ secrets.ETH_NODE_URI_BSC }}
# ETH_NODE_URI_CELO: ${{ secrets.ETH_NODE_URI_CELO }}
# ETH_NODE_URI_FANTOM: ${{ secrets.ETH_NODE_URI_FANTOM }}
# ETH_NODE_URI_FRAXTAL: ${{ secrets.ETH_NODE_URI_FRAXTAL }}
# ETH_NODE_URI_FUSE: ${{ secrets.ETH_NODE_URI_FUSE }}
# ETH_NODE_URI_GNOSIS: ${{ secrets.ETH_NODE_URI_GNOSIS }}
# ETH_NODE_URI_LINEA: ${{ secrets.ETH_NODE_URI_LINEA }}
# ETH_NODE_URI_MANTLE: ${{ secrets.ETH_NODE_URI_MANTLE }}
# ETH_NODE_URI_METIS: ${{ secrets.ETH_NODE_URI_METIS }}
# ETH_NODE_URI_MODE: ${{ secrets.ETH_NODE_URI_MODE }}
# ETH_NODE_URI_MOONBEAM: ${{ secrets.ETH_NODE_URI_MOONBEAM }}
# ETH_NODE_URI_MOONRIVER: ${{ secrets.ETH_NODE_URI_MOONRIVER }}
# ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
# ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
# ETH_NODE_URI_POLYGONZKEVM: ${{ secrets.ETH_NODE_URI_POLYGONZKEVM }}
# ETH_NODE_URI_ROOTSTOCK: ${{ secrets.ETH_NODE_URI_ROOTSTOCK }}
# ETH_NODE_URI_SCROLL: ${{ secrets.ETH_NODE_URI_SCROLL }}
# ETH_NODE_URI_SEI: ${{ secrets.ETH_NODE_URI_SEI }}
# ETH_NODE_URI_ZKSYNC: ${{ secrets.ETH_NODE_URI_ZKSYNC }}
# PRIVATE_KEY_PAUSER_WALLET: ${{ secrets.TEST_PRIV_KEY_SECRET }}

# - name: Send Discord message
# uses: Ilshidur/[email protected]
Expand Down

0 comments on commit 218cac5

Please sign in to comment.