diff --git a/.github/workflows/deploy_package.yml b/.github/workflows/deploy_package.yml index ac641f84..cd47197a 100644 --- a/.github/workflows/deploy_package.yml +++ b/.github/workflows/deploy_package.yml @@ -44,27 +44,25 @@ jobs: - name: Determine architecture run: | - ARCHITECTURE=$(uname -m) if [[ "${{ steps.get_arch.outputs.cmd_result }}" =~ ^x86 ]]; then echo "package_postfix=amd64.dev" >> $GITHUB_ENV else echo "package_postfix=arm64.dev" >> $GITHUB_ENV fi - - name: Package install testnet - id: package_install_testnet + - name: Package install ${{ inputs.target }} uses: ./.github/actions/ssm_execute with: instance_id: ${{ secrets[inputs.instance_id] }} command: | - sudo rm -f miden-* - sudo systemctl stop miden-node - sudo systemctl stop miden-faucet - sudo apt remove miden-node miden-faucet -y - wget https://github.com/0xPolygonMiden/miden-node/releases/download/${{ inputs.tag }}/miden-faucet-${{ inputs.tag }}-${{ env.package_postfix }} - wget https://github.com/0xPolygonMiden/miden-node/releases/download/${{ inputs.tag }}/miden-node-${{ inputs.tag }}-${{ env.package_postfix }} - dpkg -i miden-node-${{ inputs.tag }}-${{ env.package_postfix }} - dpkg -i miden-faucet-${{ inputs.tag }}-${{ env.package_postfix }} + "sudo rm -f miden-*", + "sudo systemctl stop miden-node", + "sudo systemctl stop miden-faucet", + "sudo apt remove miden-node miden-faucet -y", + "wget https://github.com/0xPolygonMiden/miden-node/releases/download/${{ inputs.tag }}/miden-faucet-${{ inputs.tag }}-${{ env.package_postfix }}", + "wget https://github.com/0xPolygonMiden/miden-node/releases/download/${{ inputs.tag }}/miden-node-${{ inputs.tag }}-${{ env.package_postfix }}", + "dpkg -i miden-node-${{ inputs.tag }}-${{ env.package_postfix }}", + "dpkg -i miden-faucet-${{ inputs.tag }}-${{ env.package_postfix }}" if: ${{ inputs.target }} == "testnet" - name: Download artifact @@ -79,12 +77,12 @@ jobs: with: instance_id: ${{ secrets[inputs.instance_id] }} command: | - sudo rm -f miden-* - sudo systemctl stop miden-node - sudo systemctl stop miden-faucet - sudo apt remove miden-node miden-faucet -y - dpkg -i miden-node-${{ inputs.tag }}-${{ env.package_postfix }} - dpkg -i miden-faucet-${{ inputs.tag }}-${{ env.package_postfix }} + "sudo rm -f miden-*", + "sudo systemctl stop miden-node", + "sudo systemctl stop miden-faucet", + "sudo apt remove miden-node miden-faucet -y", + "dpkg -i miden-node-${{ inputs.tag }}-${{ env.package_postfix }}", + "dpkg -i miden-faucet-${{ inputs.tag }}-${{ env.package_postfix }}" if: ${{ inputs.target }} == "devnet" - name: Configure environment @@ -93,11 +91,11 @@ jobs: with: instance_id: ${{ secrets[inputs.instance_id] }} command: | - sleep 10 - sudo chown -R miden /opt/miden - sudo /usr/bin/miden-node init -c /etc/miden/miden-node.toml -g /opt/miden/miden-node/genesis.toml - sudo /usr/bin/miden-node make-genesis -i /opt/miden/miden-node/genesis.toml -o /opt/miden/miden-node/genesis.dat - sudo /usr/bin/miden-faucet init -c /opt/miden/miden-faucet/miden-faucet.toml + "sleep 10", + "sudo chown -R miden /opt/miden", + "sudo /usr/bin/miden-node init -c /etc/miden/miden-node.toml -g /opt/miden/miden-node/genesis.toml", + "sudo /usr/bin/miden-node make-genesis -i /opt/miden/miden-node/genesis.toml -o /opt/miden/miden-node/genesis.dat", + "sudo /usr/bin/miden-faucet init -c /opt/miden/miden-faucet/miden-faucet.toml" - name: Start miden node service @@ -106,9 +104,8 @@ jobs: with: instance_id: ${{ secrets[inputs.instance_id] }} command: | - COMMAND_ID=$(aws ssm send-command \ - sudo systemctl daemon-reload - sudo systemctl start miden-node + "sudo systemctl daemon-reload", + "sudo systemctl start miden-node" - name: Start miden faucet service id: start_miden_faucet_service @@ -116,5 +113,5 @@ jobs: with: instance_id: ${{ secrets[inputs.instance_id] }} command: | - sudo systemctl daemon-reload - sudo systemctl start miden-faucet + "sudo systemctl daemon-reload", + "sudo systemctl start miden-faucet"