Skip to content

Commit

Permalink
fix(stacks.api): use forked sops action with support for arm64
Browse files Browse the repository at this point in the history
Signed-off-by: Braden Mars <[email protected]>
  • Loading branch information
BradenM committed Aug 6, 2023
1 parent 327294f commit 8bcf854
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 32 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ jobs:
if: inputs.runner == 'self-hosted'
with:
arch: arm64
- name: Install SOPs
uses: CrisisCleanup/mozilla-sops-action@main
with:
version: 3.7.3
- name: Setup PNPM
uses: pnpm/[email protected]
- name: Setup Node
Expand All @@ -58,24 +62,7 @@ jobs:
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- name: Install
run: >-
echo Installing Sops...
ARCH=$(uname -m)
if [ "$ARCH" = "aarch64" ]; then
curl -L https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux.arm64 -o sops
else
curl -L https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux -o sops
fi
chmod 755 sops
mv sops /usr/local/bin
sops --version
pnpm install
run: pnpm install
- name: Build
run: |-
pnpm build
Expand Down
22 changes: 8 additions & 14 deletions packages/stacks/api/src/gh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,20 +205,7 @@ class GithubCodePipeline {
})
pipelineKms.grantDecrypt(actionsRole.role)

const sopsInstall = [
'echo Installing Sops...',
'ARCH=$(uname -m)',
'if [ "$ARCH" = "aarch64" ]; then',
' curl -L https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux.arm64 -o sops',
'else',
' curl -L https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux -o sops',
'fi',
'chmod 755 sops',
'mv sops /usr/local/bin',
'sops --version',
]

const installCommands = [...sopsInstall, 'pnpm install']
const installCommands = ['pnpm install']

const commands = [
'pnpm build',
Expand Down Expand Up @@ -270,6 +257,13 @@ class GithubCodePipeline {
arch: 'arm64',
},
},
{
name: 'Install SOPs',
uses: 'CrisisCleanup/mozilla-sops-action@main',
with: {
version: '3.7.3',
},
},
{
name: 'Setup PNPM',
uses: 'pnpm/[email protected]',
Expand Down

0 comments on commit 8bcf854

Please sign in to comment.