Skip to content

Commit

Permalink
Check with secret access update
Browse files Browse the repository at this point in the history
  • Loading branch information
sshrihar committed Aug 30, 2024
1 parent 868342c commit 7a4cfec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/arm_deb_packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ jobs:
if [[ ${{ github.event_name }} == "release" || ${{ github.event_name }} == "prereleased" ]]; then
echo "target=testnet" >> $GITHUB_OUTPUT
echo "tag=${{ env.GIT_TAG }}" >> $GITHUB_OUTPUT
echo "account_id=${{ secrets.MIDEN_DEV_ACCOUNT_ID }}" >> $GITHUB_OUTPUT
echo "instance_id=${{ secrets.TESTNET_INSTANCE_ID }}" >> $GITHUB_OUTPUT
echo "account_id=MIDEN_DEV_ACCOUNT_ID" >> $GITHUB_OUTPUT
echo "instance_id=TESTNET_INSTANCE_ID" >> $GITHUB_OUTPUT
else
echo "target=devnet" >> $GITHUB_OUTPUT
echo "tag=next" >> $GITHUB_OUTPUT
echo "account_id=${{ secrets.MIDEN_DEV_ACCOUNT_ID }}" >> $GITHUB_OUTPUT
echo "instance_id=${{ secrets.DEVNET_INSTANCE_ID }}" >> $GITHUB_OUTPUT
echo "account_id=MIDEN_DEV_ACCOUNT_ID" >> $GITHUB_OUTPUT
echo "instance_id=DEVNET_INSTANCE_ID" >> $GITHUB_OUTPUT
fi

Expand All @@ -192,3 +192,4 @@ jobs:
tag: ${{ needs.build_package.outputs.tag }}
account_id: ${{ needs.build_package.outputs.account_id }}
instance_id: ${{ needs.build_package.outputs.instance_id }}
secrets: inherit
16 changes: 8 additions & 8 deletions .github/workflows/deploy_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ jobs:
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::${{ inputs.account_id }}:role/${{ inputs.oidcrole }}-GithubActionsRole
role-to-assume: "arn:aws:iam::${{ secrets[inputs.account_id] }}:role/${{ inputs.oidcrole }}-GithubActionsRole"
role-session-name: GithubActionsSession

- name: Execute Architecture for instance
id: get_arch
uses: ./.github/actions/ssm_execute
with:
instance_id: ${{ inputs.instance_id }}
instance_id: ${{ secrets[inputs.instance_id] }}
command: uname -m

- name: Determine architecture
Expand All @@ -50,7 +50,7 @@ jobs:
id: package_install_testnet
uses: ./.github/actions/ssm_execute
with:
instance_id: ${{ inputs.instance_id }}
instance_id: ${{ secrets[inputs.instance_id] }}
command: |
sudo rm -f miden-*
sudo systemctl stop miden-node
Expand All @@ -72,7 +72,7 @@ jobs:
id: package_install_devnet
uses: ./.github/actions/ssm_execute
with:
instance_id: ${{ inputs.instance_id }}
instance_id: ${{ secrets[inputs.instance_id] }}
command: |
sudo rm -f miden-*
sudo systemctl stop miden-node
Expand All @@ -86,7 +86,7 @@ jobs:
id: configure_environment
uses: ./.github/actions/ssm_execute
with:
instance_id: ${{ inputs.instance_id }}
instance_id: ${{ secrets[inputs.instance_id] }}
command: |
sleep 10
sudo chown -R miden /opt/miden
Expand All @@ -99,7 +99,7 @@ jobs:
id: start_miden_service
uses: ./.github/actions/ssm_execute
with:
instance_id: ${{ inputs.instance_id }}
instance_id: ${{ secrets[inputs.instance_id] }}
command: |
COMMAND_ID=$(aws ssm send-command \
sudo systemctl daemon-reload
Expand All @@ -109,7 +109,7 @@ jobs:
id: start_miden_faucet_service
uses: ./.github/actions/ssm_execute
with:
instance_id: ${{ inputs.instance_id }}
instance_id: ${{ secrets[inputs.instance_id] }}
command: |
sudo systemctl daemon-reload
sudo systemctl start miden-faucet

0 comments on commit 7a4cfec

Please sign in to comment.