Workflow file for this run
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
name: Diamond Emergency Pause | |
on: | |
push: | |
workflow_dispatch: # Allows manual trigger of the workflow | |
jobs: | |
diamond-emergency-pause: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check user permissions | |
id: check_user | |
run: | | |
ALLOWED_USERS=("0xDEnYO" "maxklenk" "ezynda3") | |
if [[ ! " ${ALLOWED_USERS[@]} " =~ " ${{ github.actor }} " ]]; then | |
echo "User ${{ github.actor }} is not allowed to run this workflow." | |
exit 1 | |
fi | |
shell: bash | |
# steps: | |
# - name: Check team membership | |
# id: check_team | |
# run: | | |
# TEAM_NAME="DiamondPauser" | |
# ORG_NAME="lifinance" | |
# USER=${{ github.actor }} | |
# RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/orgs/$ORG_NAME/teams/$TEAM_NAME/memberships/$USER") | |
# if echo "$RESPONSE" | grep -q '"state": "active"'; then | |
# echo "User $USER is a member of team $TEAM_NAME." | |
# else | |
# echo "User $USER is not a member of team $TEAM_NAME." | |
# exit 1 | |
# fi | |
# shell: bash | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
ref: EmergencyPauseGithubAction # Ensure you are checking out the correct branch | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Run diamondEMERGENCYPause script | |
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.PRIVATE_KEY_PAUSER_WALLET }} | |
PRIVATE_KEY_PAUSER_WALLET: ${{ secrets.TEST_PRIV_KEY_SECRET }} | |
# - name: Send Discord message | |
# uses: Ilshidur/[email protected] | |
# with: | |
# args: 'ATTENTION - the emergency diamond pause action was just executed by ${{ github.actor }}' | |
# env: | |
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_DEV_SMARTCONTRACTS }} |