Skip to content
name: Pause PRODUCTION diamond (CAREFUL)
on:
push:
workflow_dispatch: # Allows manual trigger of the workflow
jobs:
diamond-emergency-pause:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get team members
id: get-team-members
uses: garnertb/get-team-members@v1
with:
token: ${{ secrets.github.token }}
org: lifinance
team_slug: diamondpauser
- name: Check if action was triggered by a member of Github "DiamondPauser" group
id: authenticate
run: |
USER=${{ github.actor }}
TEAM_MEMBERS=${{ steps.get-team-members.outputs.members }}
echo "TEAM_MEMBERS: $TEAM_MEMBERS"
if echo "$TEAM_MEMBERS" | grep -q "$USER"; then
echo "User $USER is a member of team diamondpauser and authorized to execute this action."
else
echo "You ($USER) are not authorized to execute this action. Please ask any of these people to execute the action: https://github.com/orgs/lifinance/teams/diamondpauser/members"
exit 1
fi
shell: bash
- 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 }}