Skip to content

Commit

Permalink
Update secrets to pass as input
Browse files Browse the repository at this point in the history
  • Loading branch information
sshrihar committed Aug 30, 2024
1 parent 84358a7 commit 868342c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/arm_deb_packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,5 @@ jobs:
with:
target: ${{ needs.build_package.outputs.target }}
tag: ${{ needs.build_package.outputs.tag }}
secrets:
account_id: ${{ needs.build_package.outputs.account_id }}
instance_id: ${{ needs.build_package.outputs.instance_id }}
22 changes: 12 additions & 10 deletions .github/workflows/deploy_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ on:
tag:
type: string
default: "next"
secrets:
oidcrole:
type: string
default: midendev
account_id:
required: true
type: string
instance_id:
required: true
type: string

permissions:
id-token: write
Expand All @@ -25,14 +27,14 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::${{ secrets.account_id }}:role/midendev-GithubActionsRole
role-to-assume: arn:aws:iam::${{ 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: ${{ secrets.instance_id }}
instance_id: ${{ inputs.instance_id }}
command: uname -m

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

0 comments on commit 868342c

Please sign in to comment.