-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
13 additions
and
15 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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy mangata-node to `eigen-mococo` | ||
name: Deploy mangata-node to `rollup-testnet` | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -14,12 +14,12 @@ on: | |
required: true | ||
type: string | ||
|
||
concurrency: eigen-mococo-environment | ||
concurrency: rollup-testnet-environment | ||
|
||
jobs: | ||
deploy-eigen-mococo: | ||
deploy-rollup-testnet: | ||
runs-on: ubuntu-latest | ||
environment: eigen-mococo | ||
environment: rollup-testnet | ||
env: | ||
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} | ||
steps: | ||
|
@@ -30,29 +30,27 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
repository: mangata-finance/gitops | ||
# TODO: Has to be changed to main once everything will be checked | ||
ref: feat/deploy-eigen-layer-collators-env-MGX-878 | ||
# ref: main | ||
ref: main | ||
token: ${{ secrets.BOT_GITHUB_TOKEN }} | ||
|
||
- name: Push updated version to `gitops` repository | ||
id: version | ||
run: | | ||
echo -n '${{ inputs.version }}' > helmfiles/eigen-mococo/.version | ||
echo -n '${{ inputs.version }}' > helmfiles/rollup-testnet/.version | ||
git config user.name mangatafinance | ||
git config user.email [email protected] | ||
git add . | ||
git commit -m 'chore: deploy ${{ inputs.version }} to eigen-mococo environment' || \ | ||
git commit -m 'chore: deploy ${{ inputs.version }} to rollup-testnet environment' || \ | ||
echo "changed=false" >> $GITHUB_OUTPUT | ||
git push | ||
- name: Watch deployment workflow run | ||
run: | | ||
# Rerun previous workflow if version didn't change | ||
[ -n '${{ steps.version.outputs.changed }}' ] && gh run rerun $(gh run list -w deploy-eigen-mococo.yml -L1 --json databaseId --jq '.[].databaseId') | ||
[ -n '${{ steps.version.outputs.changed }}' ] && gh run rerun $(gh run list -w deploy-rollup-testnet.yml -L1 --json databaseId --jq '.[].databaseId') | ||
sleep 5 && gh run list -L10 -w deploy-eigen-mococo.yml | ||
export RUN_ID=$(gh run list -w deploy-eigen-mococo.yml -L1 --json databaseId --jq '.[].databaseId') | ||
sleep 5 && gh run list -L10 -w deploy-rollup-testnet.yml | ||
export RUN_ID=$(gh run list -w deploy-rollup-testnet.yml -L1 --json databaseId --jq '.[].databaseId') | ||
if [[ ($(gh run view "$RUN_ID" --json headSha --jq '.headSha') != $(git rev-parse HEAD)) && -z '${{ steps.version.outputs.changed }}' ]]; then | ||
echo "Commited git SHA doesn't match with the SHA of the retrieved Run ID" | ||
|