From e304b6495551e3370e52d8ffc6971c761ee9385e Mon Sep 17 00:00:00 2001 From: David Ugbero Date: Tue, 8 Oct 2024 18:27:59 +0100 Subject: [PATCH 1/4] fix: implement CD for boltz mainnet --- .github/workflows/deploy.boltz.mainnet.yml | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/deploy.boltz.mainnet.yml diff --git a/.github/workflows/deploy.boltz.mainnet.yml b/.github/workflows/deploy.boltz.mainnet.yml new file mode 100644 index 0000000..0a3d6f3 --- /dev/null +++ b/.github/workflows/deploy.boltz.mainnet.yml @@ -0,0 +1,36 @@ +--- +name: CD for Boltz Mainnet + +on: + push: + tags: + - '**stable-boltzmainnet**' + +jobs: + deploy-boltz-mainnet: + runs-on: ubuntu-latest + environment: + name: Boltz-Mainnet + permissions: + id-token: write + contents: read + + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 + with: + role-to-assume: ${{ secrets.BOLTZ_MAINNET_ROLE_ARN }} + aws-region: "${{ secrets.BOLTZ_MAINNET_AWS_REGION }}" + + - name: Deploy rif-relay-server on Boltz Mainnet + run: | + aws ssm send-command \ + --document-name "boltz-mainnet-deploy" \ + --instance-ids "$INSTANCE_ID" \ + --document-version '$LATEST' + echo "Deploy sent to EC2 instance" + env: + INSTANCE_ID: ${{ secrets.BOLTZ_MAINNET_INSTANCE_ID }} \ No newline at end of file From 96efc69b554b33f803596a687ee796b1e9e75996 Mon Sep 17 00:00:00 2001 From: David Ugbero Date: Tue, 8 Oct 2024 18:32:47 +0100 Subject: [PATCH 2/4] fix: indent --- .github/workflows/deploy.boltz.mainnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.boltz.mainnet.yml b/.github/workflows/deploy.boltz.mainnet.yml index 0a3d6f3..d91e019 100644 --- a/.github/workflows/deploy.boltz.mainnet.yml +++ b/.github/workflows/deploy.boltz.mainnet.yml @@ -32,5 +32,5 @@ jobs: --instance-ids "$INSTANCE_ID" \ --document-version '$LATEST' echo "Deploy sent to EC2 instance" - env: - INSTANCE_ID: ${{ secrets.BOLTZ_MAINNET_INSTANCE_ID }} \ No newline at end of file + env: + INSTANCE_ID: ${{ secrets.BOLTZ_MAINNET_INSTANCE_ID }} \ No newline at end of file From d05c879c63e681ad02a5889fe6a7ffbe29a2a6f8 Mon Sep 17 00:00:00 2001 From: David Ugbero Date: Tue, 8 Oct 2024 18:35:19 +0100 Subject: [PATCH 3/4] fix: indentation --- .github/workflows/deploy.boltz.mainnet.yml | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy.boltz.mainnet.yml b/.github/workflows/deploy.boltz.mainnet.yml index d91e019..2d7ca8a 100644 --- a/.github/workflows/deploy.boltz.mainnet.yml +++ b/.github/workflows/deploy.boltz.mainnet.yml @@ -9,28 +9,28 @@ on: jobs: deploy-boltz-mainnet: runs-on: ubuntu-latest - environment: - name: Boltz-Mainnet - permissions: - id-token: write - contents: read + environment: + name: Boltz-Mainnet + permissions: + id-token: write + contents: read - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 - with: - role-to-assume: ${{ secrets.BOLTZ_MAINNET_ROLE_ARN }} - aws-region: "${{ secrets.BOLTZ_MAINNET_AWS_REGION }}" + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 + with: + role-to-assume: ${{ secrets.BOLTZ_MAINNET_ROLE_ARN }} + aws-region: "${{ secrets.BOLTZ_MAINNET_AWS_REGION }}" - - name: Deploy rif-relay-server on Boltz Mainnet - run: | - aws ssm send-command \ - --document-name "boltz-mainnet-deploy" \ - --instance-ids "$INSTANCE_ID" \ - --document-version '$LATEST' - echo "Deploy sent to EC2 instance" - env: - INSTANCE_ID: ${{ secrets.BOLTZ_MAINNET_INSTANCE_ID }} \ No newline at end of file + - name: Deploy rif-relay-server on Boltz Mainnet + run: | + aws ssm send-command \ + --document-name "boltz-mainnet-deploy" \ + --instance-ids "$INSTANCE_ID" \ + --document-version '$LATEST' + echo "Deploy sent to EC2 instance" + env: + INSTANCE_ID: ${{ secrets.BOLTZ_MAINNET_INSTANCE_ID }} From c8ec5328522cf840fc4ef9d295353ca130939269 Mon Sep 17 00:00:00 2001 From: David Ugbero Date: Tue, 8 Oct 2024 18:43:15 +0100 Subject: [PATCH 4/4] fix: test that it works with push on current branch --- .github/workflows/deploy.boltz.mainnet.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.boltz.mainnet.yml b/.github/workflows/deploy.boltz.mainnet.yml index 2d7ca8a..c7bc55f 100644 --- a/.github/workflows/deploy.boltz.mainnet.yml +++ b/.github/workflows/deploy.boltz.mainnet.yml @@ -5,6 +5,8 @@ on: push: tags: - '**stable-boltzmainnet**' + branches: + - cd-boltz-mainnet jobs: deploy-boltz-mainnet: @@ -23,7 +25,7 @@ jobs: uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 with: role-to-assume: ${{ secrets.BOLTZ_MAINNET_ROLE_ARN }} - aws-region: "${{ secrets.BOLTZ_MAINNET_AWS_REGION }}" + aws-region: ${{ secrets.BOLTZ_MAINNET_AWS_REGION }} - name: Deploy rif-relay-server on Boltz Mainnet run: |